'OSError' object has no attribute 'message'

Hi ,
I am getting this error on emails
‘OSError’ object has no attribute ‘message’
Its on version 12

You omit the error traceback and also OS and python version.

Maybe share those details or what is your question?!

1 Like

I am getting the same error. I am on Ubuntu 18.04, erpnext 11.1.48, frappe 11.1.43 and Python 3.6.8
This occurred when I create a PO and try email to supplier. Any pointers what is triggering this error?

This is the error message I am seeing -
‘OSError’ object has no attribute ‘message’
Traceback (most recent call last):
File “/home/erpnext/vendorerp/apps/frappe/frappe/utils/pdf.py”, line 23, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/erpnext/vendorerp/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/erpnext/vendorerp/env/src/pdfkit/pdfkit/pdfkit.py”, line 140, in to_pdf
raise IOError(‘wkhtmltopdf reported an error:\n’ + stderr.decode(‘utf-8’))
OSError: wkhtmltopdf reported an error:

Any pointers appreciated, folks!

Your traceback is the same as here PDF in invoice email - #13 by hooksie11

So follow the notes there to check that you specify the line “host_name” in your site_config.json

setting host_name solved the issue for now
Thanks