Hi,
As the letterhead did not show up in the pdf print, even though the “Letterhead” box was checked, I thought updating to a newer version of ERPNext might help.
However, after updating to the latest version using the
bench update
command (I installed the VirtualBox image of ERPNext), I cannot print any files to pdf anymore:
Traceback (innermost last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 52, in application
response = frappe.api.handle()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
return frappe.handler.handle()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 531, in call
return fn(*args, **newargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 94, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 109, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr.decode('utf-8'))
IOError: wkhtmltopdf reported an error:
Loading pages (1/6)
[> ] 0%
[======> ] 10%
[=========> ] 16%
Warning: Failed to load http://erpnext.erpnext-vm/assets/frappe/css/bootstrap.css (ignore)
Warning: Failed to load http://erpnext.erpnext-vm/files/sovonex.png (ignore)
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This migth be an indication of an iframe taking to long to load.
Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This migth be an indication of an iframe taking to long to load.
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[==============================> ] Page 1 of 2
[============================================================] Page 2 of 2
Done
Exit with code 1 due to network error: HostNotFoundError
Do you have an idea what might have gone wrong here?
Cheers,
Stefan