Bug 1709000 - weasyprint always crashes when rendering
Summary: weasyprint always crashes when rendering
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: weasyprint
Version: 30
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-12 11:57 UTC by bug.report.tracker
Modified: 2019-06-06 01:06 UTC (History)
2 users (show)

Fixed In Version: weasyprint-0.39-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-06 01:06:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample html input file to use with weasyprint. (361 bytes, text/html)
2019-05-12 11:57 UTC, bug.report.tracker
no flags Details

Description bug.report.tracker 2019-05-12 11:57:15 UTC
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

Comment 1 Felix Schwarz 2019-05-12 19:17:05 UTC
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).

Comment 2 bug.report.tracker 2019-05-12 20:01:23 UTC
(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.

Comment 3 bug.report.tracker 2019-05-27 18:27:39 UTC
bugfix update in Fedora 30 for weasyprint
Status: unpushed

Is there any progress?

Thanks,
V.

Comment 4 Felix Schwarz 2019-05-28 07:09:51 UTC
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.

Comment 5 Fedora Update System 2019-05-28 07:16:37 UTC
weasyprint-0.39-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-78c5caea7a

Comment 6 bug.report.tracker 2019-05-28 19:12:47 UTC
(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.

Comment 7 Fedora Update System 2019-05-29 01:35:34 UTC
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

Comment 8 Fedora Update System 2019-06-06 01:06:11 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.