I’m getting an error when trying to email a Sales Order with PDF Attachment of a custom Print Format. The main error says:
Message
Error generating PDF, attachment sent as HTML
There were errors while sending email. Please try again.
When I look at the Javascript console log I see this:
bootstrap.css.map:1 GET https://mcleanimages.frappecloud.com/assets/css/bootstrap.css.map 404 (OK)
2015-05-04 16:58:26.316 frappe.min.js:310 Traceback (innermost last):
File "/home/frappe/press/benches/1504281352/apps/frappe/frappe/core/doctype/communication/communication.py", line 156, in attach_print
mail.add_pdf_attachment(name.replace(' ','').replace('/','-') + '.pdf', print_html)
File "/home/frappe/press/benches/1504281352/apps/frappe/frappe/utils/email_lib/email_body.py", line 157, in add_pdf_attachment
self.add_attachment(name, get_pdf(html, options), 'application/octet-stream')
File "/home/frappe/press/benches/1504281352/apps/frappe/frappe/utils/pdf.py", line 29, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/frappe/press/benches/1504281352/env/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/frappe/press/benches/1504281352/env/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 116, 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%
[=============================> ] 49%
[=====================================> ] 62%
[===========================================> ] 72%
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[===================> ] Page 1 of 3
[=======================================> ] Page 2 of 3
[============================================================] Page 3 of 3
Done
Exit with code 1 due to network error: UnknownNetworkError
I really need to get this working so we can send proofs to customers automatically. At the moment it is not working at all
Thanks.