ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Problem to make PDF after update to 10.1.64


#1

Hello
We update our erp to 10.1.64 , after that when we want to make pdf we got below error :slight_smile:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 53, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/print_format.py”, line 48, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 14, in get_pdf
html, options = prepare_options(html, options)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 71, in prepare_options
html, html_options = read_options_from_html(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 86, in read_options_from_html
soup = BeautifulSoup(html, “html5lib”)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/bs4/init.py”, line 215, in init
self._feed()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/bs4/init.py”, line 239, in _feed
self.builder.feed(self.markup)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/bs4/builder/_html5lib.py”, line 50, in feed
doc = parser.parse(markup, encoding=self.user_specified_encoding)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/html5lib/html5parser.py”, line 289, in parse
self._parse(stream, False, None, *args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/html5lib/html5parser.py”, line 130, in _parse
self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/html5lib/_tokenizer.py”, line 36, in init
self.stream = HTMLInputStream(stream, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/html5lib/_inputstream.py”, line 149, in HTMLInputStream
return HTMLUnicodeInputStream(source, **kwargs)
TypeError: init() got an unexpected keyword argument ‘encoding’

any suggestion to solve issue ?


#2

We are also having this issue on the Staging branch.