Created attachment 1567500 [details] Sample html input file to use with weasyprint. Description of problem: The following error is displayed and weasyprint crashes instead of rendering html file to pdf: $ weasyprint -f pdf README.html __README.pdf Traceback (most recent call last): File "/usr/bin/weasyprint", line 11, in <module> load_entry_point('WeasyPrint==0.22', 'console_scripts', 'weasyprint')() File "/usr/lib/python3.7/site-packages/weasyprint/__main__.py", line 155, in main media_type=args.media_type) File "/usr/lib/python3.7/site-packages/weasyprint/__init__.py", line 91, in __init__ namespaceHTMLElements=False) File "/usr/lib/python3.7/site-packages/html5lib/html5parser.py", line 47, in parse return p.parse(doc, **kwargs) File "/usr/lib/python3.7/site-packages/html5lib/html5parser.py", line 289, in parse self._parse(stream, False, None, *args, **kwargs) File "/usr/lib/python3.7/site-packages/html5lib/html5parser.py", line 130, in _parse self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs) File "/usr/lib/python3.7/site-packages/html5lib/_tokenizer.py", line 36, in __init__ self.stream = HTMLInputStream(stream, **kwargs) File "/usr/lib/python3.7/site-packages/html5lib/_inputstream.py", line 151, in HTMLInputStream return HTMLBinaryInputStream(source, **kwargs) TypeError: __init__() got an unexpected keyword argument 'encoding' Version-Release number of selected component (if applicable): weasyprint-0.22-15.fc30.noarch How reproducible: always Steps to Reproduce: 1. start weasiprint: weasyprint -f pdf README.html __README.pdf 2. 3. Actual results: crash Expected results: rendered pdf file Additional info: This might have been fixed in the latest weasyprint version with html5lib according to the following link: https://github.com/Kozea/WeasyPrint/issues/334
This should be fixed by weasyprint 0.39 which is currently in testing https://bodhi.fedoraproject.org/updates/FEDORA-2019-5e7ba0829d It would be nice if you could install that package + leave feedback in bodhi (see above).
(In reply to Felix Schwarz from comment #1) > This should be fixed by weasyprint 0.39 which is currently in testing > https://bodhi.fedoraproject.org/updates/FEDORA-2019-5e7ba0829d > > It would be nice if you could install that package + leave feedback in bodhi > (see above). Thanks! I'll try that as soon as I get dnf working again. At the moment any dnf command produces this: Fedora 30 - x86_64 Failed to synchronize cache for repo 'fedora' Error: Failed to synchronize cache for repo 'fedora' Even "dnf clean all; dnf update" doesn't help.
bugfix update in Fedora 30 for weasyprint Status: unpushed Is there any progress? Thanks, V.
I unpushed the update because some invalid dependencies sneaked in during the build process. I just updated the code and fixed some more issues. The new build is underway.
weasyprint-0.39-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-78c5caea7a
(In reply to Fedora Update System from comment #5) > weasyprint-0.39-2.fc30 has been submitted as an update to Fedora 30. > https://bodhi.fedoraproject.org/updates/FEDORA-2019-78c5caea7a The above version seems to work fine. Thank you very much for your support! Thanks, Val.
weasyprint-0.39-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-78c5caea7a
weasyprint-0.39-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.