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 bugzilla.redhat.com.
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...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: weasyprint
Version: 29
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: 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:
Environment:
Last Closed: 2019-04-30 17:48:34 UTC
Type: Bug
Embargoed:


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/__init__.py", line 3141, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3125, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 984, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", 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/__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'

<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.