Bug 1685649 - [abrt] weasyprint: HTMLInputStream(): _inputstream.py:151:HTMLInputStream:TypeError: __init__() got an unexpected keyword argument 'encoding'
Summary: [abrt] weasyprint: HTMLInputStream(): _inputstream.py:151:HTMLInputStream:Typ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: weasyprint
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:e66648477a7f88163209cc33f71...
Depends On: 1475749
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-05 17:40 UTC by Mike
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-04-30 17:58:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.42 KB, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: cgroup (369 bytes, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: cpuinfo (1.42 KB, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: environ (5.74 KB, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: mountinfo (4.19 KB, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: namespaces (129 bytes, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details
File: open_fds (244 bytes, text/plain)
2019-03-05 17:40 UTC, Mike
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github Kozea WeasyPrint issues 334 0 None None None 2019-03-06 08:31:39 UTC

Description Mike 2019-03-05 17:40:28 UTC
Description of problem:
Attempting to "convert" a file from html to pdf.

Version-Release number of selected component:
weasyprint-0.22-14.fc29

Additional info:
reporter:       libreport-2.10.0
cmdline:        /usr/bin/python3 /usr/bin/weasyprint 'Red Hat Virtualization Log Collection Analysis-ATL.html' ATL.pdf
crash_function: HTMLInputStream
exception_type: TypeError
executable:     /usr/bin/weasyprint
interpreter:    python3-3.7.2-4.fc29.x86_64
kernel:         4.20.13-200.fc29.x86_64
runlevel:       N 5
type:           Python3
uid:            5040

Truncated backtrace:
_inputstream.py:151:HTMLInputStream:TypeError: __init__() got an unexpected keyword argument 'encoding'

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'

Local variables in innermost frame:
source: <_io.BufferedReader name='Red Hat Virtualization Log Collection Analysis-ATL.html'>
kwargs: {'encoding': None}
isUnicode: False

Comment 1 Mike 2019-03-05 17:40:30 UTC
Created attachment 1541088 [details]
File: backtrace

Comment 2 Mike 2019-03-05 17:40:31 UTC
Created attachment 1541089 [details]
File: cgroup

Comment 3 Mike 2019-03-05 17:40:31 UTC
Created attachment 1541090 [details]
File: cpuinfo

Comment 4 Mike 2019-03-05 17:40:32 UTC
Created attachment 1541091 [details]
File: environ

Comment 5 Mike 2019-03-05 17:40:32 UTC
Created attachment 1541092 [details]
File: mountinfo

Comment 6 Mike 2019-03-05 17:40:33 UTC
Created attachment 1541093 [details]
File: namespaces

Comment 7 Mike 2019-03-05 17:40:34 UTC
Created attachment 1541094 [details]
File: open_fds

Comment 8 Felix Schwarz 2019-03-06 08:31:39 UTC
This is an upstream bug which occurs when html5lib is too new (https://github.com/Kozea/WeasyPrint/issues/334). It is fixed in recent versions of weasyprint and will be fixed once Fedora's weasyprint package is updated (bug 1475749). Unfortunately I can't say when this will happen as the Fedora maintainer did not touch the weasyprint package for quite a while.

Comment 9 Fedora Update System 2019-04-30 18:01:47 UTC
weasyprint-0.39-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-5e7ba0829d

Comment 10 Fedora Update System 2019-05-01 01:44:22 UTC
weasyprint-0.39-1.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-5e7ba0829d

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

Comment 12 Fedora Update System 2019-05-29 01:35:36 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 13 Fedora Update System 2019-06-06 01:06:14 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.