below is the error log detail
2021-11-29 03:47:37,088 ERROR frappe Could not take error snapshot: characters_written
Site: mysite.localhost
Form Dict: {'name': 'SAL-ORD-2021-00001', 'cmd': 'frappe.email.doctype.email_queue.email_queue.send_now', 'doctype': 'Sales Order', 'format': 'Standard', 'style': None, 'doc': None, 'no_letterhead': False}
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1213, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 320, in send_now
record.send()
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 123, in send
message = ctx.build_message(recipient.recipient)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 240, in build_message
message = self.include_attachments(message)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 300, in include_attachments
print_format_file = frappe.attach_print(**attachment)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1588, in attach_print
content = get_print(doctype, name, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1554, in get_print
return get_pdf(html, options=pdf_options, output=output)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 37, in get_pdf
filedata = pdfkit.from_string(html, False, options=options or {})
File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pdfkit/api.py", line 72, in from_string
return r.to_pdf(output_path)
File "/home/frappe/frappe-bench/env/lib/python3.9/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: ConnectionRefusedError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py", line 36, in make_error_snapshot
snapshot = get_snapshot(exception)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py", line 127, in get_snapshot
value = pydoc.text.repr(getattr(evalue, name))
AttributeError: characters_written