erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

Unable to send Sales invoices to customers

Open DavisonBelemu opened this issue 1 year ago • 3 comments

Information about bug

Good day I'm unable to send invoices via email to customers directly from the system. It seems to work sometimes when i pick the option to physically attach the email however I would like to be able to pick the attachment automatically.

When i check my error log its says email sending failed. I have attached the error log in the log output section.

Module

accounts

Version

v14.13.0 - v14.23.0

Installation method

None

Relevant log output / Stack trace / Full Error Message.

Error
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 135, in send
    message = ctx.build_message(recipient.recipient)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 294, in build_message
    message = self.include_attachments(message)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 353, in include_attachments
    print_format_file = frappe.attach_print(**attachment)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 2075, in attach_print
    content = get_print(doctype, name, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 2028, in get_print
    return get_pdf(html, options=pdf_options, output=output)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 38, in get_pdf
    filedata = pdfkit.from_string(html, options=options or {}, verbose=True)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/api.py", line 75, in from_string
    return r.to_pdf(output_path)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 201, in to_pdf
    self.handle_error(exit_code, stderr)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 155, in handle_error
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)

 Queue Name: 87

DavisonBelemu avatar Feb 21 '24 07:02 DavisonBelemu