Request for Quotation not sending emails to suppliers

Tried sending emails after completing the Request for Quotation.

I get this error.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 40, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 897, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 149, in send_supplier_emails
rfq.send_to_supplier()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 59, in send_to_supplier
self.supplier_rfq_mail(rfq_supplier, update_password_link, self.get_link())
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 130, in supplier_rfq_mail
self.send_email(data, sender, subject, message, attachments)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 135, in send_email
doctype=self.doctype, name=self.name)[“name”]
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 75, in make
add_attachments(comm.name, attachments)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 340, in add_attachments
[“file_name”, “file_url”, “is_private”], as_dict=1)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 411, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, order_by, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 453, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 584, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 137, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘: ‘\’%PDF-1.4\\n1 0 obj\\n<<\\n/Title (\xfe\xff\\0R\\0F\\0Q\\0-\\00\\00\\00\\00\’ at line 1”)

Please help

Yes. In fact. Any other document, e.g invoice, sales order, etc, I can send as an email no problem. I only encounter error with Request for Quotation

The error occurs from one the attachments. A PDF is causing an SQL error. Try remove the attachment file.

Nothing is attached. I just want to send an RFQ to a bunch of suppliers

I’m getting the same error as well

Works fine in my test account.

@Johannes_Maepa @ishanloya please share versions of your ERPNext account.

Hi @umair,

Does it still work if you add more than 1 supplier and then ‘send supplier emails’?

ERPNext: v7.2.0
Frappe Framework: v7.2.0

Thanks,
Ishan

Working fine.

That’s what I am running.

Hi,

Please update your ERPNext account to v7.2.14, and check if it works. Ensure your email account settings are in place.

To be clear, the pdf “attachment” that is causing the issue is most likely the PDF of the RFQ print out. You might want to try downloading the PDF (using the supplier child table button) to see if generating the PDF causes an issue.

I updated it and it now works fine. Bug squashed. Thank you very much.