I have a deployed server running of ERPNext V13 Production. This server has multiple sites and I have made a custom print format for Sales Invoice that I am using on all of them. For some sites, the PDF is generating without any issues, but, on other sites, it gives me this error.
Traceback (most recent call last):
File "/home/bench/frappe-bench/apps/frappe/frappe/app.py", line 68, in application
response = frappe.api.handle()
File "/home/bench/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "/home/bench/frappe-bench/apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "/home/bench/frappe-bench/apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/bench/frappe-bench/apps/frappe/frappe/__init__.py", line 1198, in call
return fn(*args, **newargs)
File "/home/bench/frappe-bench/apps/frappe/frappe/utils/print_format.py", line 92, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/bench/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 40, in get_pdf
filedata = pdfkit.from_string(html, False, options=options or {})
File "/home/bench/frappe-bench/env/lib/python3.8/site-packages/pdfkit/api.py", line 72, in from_string
return r.to_pdf(output_path)
File "/home/bench/frappe-bench/env/lib/python3.8/site-packages/pdfkit/pdfkit.py", line 156, in to_pdf
raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ProtocolUnknownError
I have checked site_config.json for all sites and it appears to be the same. How can I resolve this issue?
Further information:
- ERPNext: 13.11.0
- Frappe: 13.11.0
- bench: 5.0.0-dev
- Python: 3.8.10
- wkhtmltopdf: 0.12.5 (with patched qt)
- Node: 12.22.6
- yarn: 1.22.11