Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So this just started happening on Friday (7/15).... #335

Closed
davidcastagna opened this issue Jul 18, 2016 · 1 comment
Closed

So this just started happening on Friday (7/15).... #335

davidcastagna opened this issue Jul 18, 2016 · 1 comment

Comments

@davidcastagna
Copy link

Any idea what the problem here is? Everything was fine until this past friday and then this started happening (note: no code changes were made to my main.py).

The code:

def convert_report_to_pdf(args):
    doc = weasyprint.HTML(args.url)  # just a simple URL string
    doc.write_pdf(args.outfile)   # just a simple filename string

And that was working great. Then this started:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File ".../__main__.py", line 585, in <module>
  File ".../__main__.py", line 214, in convert_report_to_pdf
  File "/usr/local/lib/python3.5/site-packages/weasyprint/__init__.py", line 92, in __init__
    namespaceHTMLElements=False)
  File "/usr/local/lib/python3.5/site-packages/html5lib/html5parser.py", line 35, in parse
    return p.parse(doc, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/html5lib/html5parser.py", line 235, in parse
    self._parse(stream, False, None, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/html5lib/html5parser.py", line 85, in _parse
    self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/html5lib/_tokenizer.py", line 36, in __init__
    self.stream = HTMLInputStream(stream, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/html5lib/_inputstream.py", line 151, in HTMLInputStream
    return HTMLBinaryInputStream(source, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'encoding'
@liZe
Copy link
Member

liZe commented Jul 18, 2016

Duplicates #334. New version coming soon!

@liZe liZe closed this as completed Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants