Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ImportError: cannot import name 'parse_xml' from 'docx.oxml' #93

Open
MitchDrage opened this issue Oct 11, 2023 · 2 comments
Open

ImportError: cannot import name 'parse_xml' from 'docx.oxml' #93

MitchDrage opened this issue Oct 11, 2023 · 2 comments

Comments

@MitchDrage
Copy link

Hi there!

I've just started getting this import error as of a few days ago:

File "/azp/_work/1/s/antenv/lib/python3.10/site-packages/docxcompose/properties.py", line 9, in <module>
    from docx.oxml import parse_xml
ImportError: cannot import name 'parse_xml' from 'docx.oxml'

It looks like the python-docx project has moved their oxml files as part of their bump from 0.8.11 to 1.0.0:
from: python-docx/docx/oxml
to: python-docx/src/docx/oxml

@patou01
Copy link

patou01 commented Oct 11, 2023

Linking this here, because it might be fixed in 1.0.1 python-openxml/python-docx#1256

@dmazoli
Copy link

dmazoli commented Oct 11, 2023

Hi there!

I think I've managed to fix it by adding python-docx==0.8.11 before docxcompose dependency on my requirements file.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants