pqzx / html2docx

Convert html to docx
MIT License
69 stars 49 forks source link

ImportError: cannot import name 'OxmlElement' from 'docx.oxml' #61

Open cmin764 opened 11 months ago

cmin764 commented 11 months ago

Happening with versions of python-docx above 0.8.11 due to the breaking recently released 1.0.0.

Solution: Following semver in the requirements dependency pin which produces a setup.cfg like this during the build time:

[metadata]
name = htmldocx
version = 0.0.6
author = pqzx
author_email = jc3664@gmail.com
description = Convert html to docx
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pqzx/html2docx
project_urls = 
    Bug Tracker = https://github.com/pqzx/html2docx/issues
classifiers = 
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
packages = htmldocx
python_requires = >=3.6
install_requires = 
    python-docx >= 0.8.10
    beautifulsoup4 >= 4.7.0

[egg_info]
tag_build = 
tag_date = 0

Why is it python-docx >= 0.8.10 and not python-docx == 0.8.10 as stated in the requirements.txt file?