Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1560147 - The 'WeasyPrint==0.22' distribution was not found and is required by the application
Summary: The 'WeasyPrint==0.22' distribution was not found and is required by the appl...
Alias: None
Product: Fedora
Classification: Fedora
Component: weasyprint
Version: 29
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-24 02:59 UTC by Audrey Yeena Toskin
Modified: 2019-04-30 17:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-04-30 17:48:34 UTC
Type: Bug

Attachments (Terms of Use)

Description Audrey Yeena Toskin 2018-03-24 02:59:01 UTC
Trying to run a newly installed weasyprint always results in this error:

↪  weasyprint  ./input.html  ./output.pdf

Traceback (most recent call last):
  File "/usr/bin/weasyprint", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3141, in <module>
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3125, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3154, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 666, in _build_master
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 984, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/", line 870, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'WeasyPrint==0.22' distribution was not found and is required by the application

Perhaps related to Bug #1331566? There, the OP does not actually provide the stack trace, and their recommendation of installing `python3-weasyprint` did not resolve the issue for me.

Comment 1 Jan Kurik 2018-08-14 10:09:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 2 Audrey Yeena Toskin 2018-12-29 20:54:02 UTC
Works for me now :)

Comment 3 Audrey Yeena Toskin 2018-12-29 21:00:49 UTC
Or, no, I'm dumb, sorry. WeasyPrint doesn't throw an error for *all* commands (like --help) anymore, but does when trying to actually produce a PDF. It's a different stacktrace this time.

↪  weasyprint  ./input.html  ./output.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/", line 155, in main
  File "/usr/lib/python3.7/site-packages/weasyprint/", line 91, in __init__
  File "/usr/lib/python3.7/site-packages/html5lib/", line 47, in parse
    return p.parse(doc, **kwargs)
  File "/usr/lib/python3.7/site-packages/html5lib/", line 289, in parse
    self._parse(stream, False, None, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/html5lib/", line 130, in _parse
    self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs)
  File "/usr/lib/python3.7/site-packages/html5lib/", line 36, in __init__ = HTMLInputStream(stream, **kwargs)
  File "/usr/lib/python3.7/site-packages/html5lib/", line 151, in HTMLInputStream
    return HTMLBinaryInputStream(source, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'encoding'

<exit code 1>

I'm trying now with weasyprint 0.22, release 14 on Fedora 29 Workstation x86_64.

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