ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Outgoing email error - trigger_daily_alerts escape unicode


#1

Hi I just installed erpnext and going to setup my company, when I realize I got a notification about Error outgoing email. I don’t think I do something about email but I got this error. This is the traceback

{'retry': 0, 'log': <function log at 0x7f1b0c6546e0>, 'site': u'site1.local', 'event': u'daily', 'method_name': u'frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts', 'method': <function trigger_daily_alerts at 0x7f1b0c65f668>, 'user': u'Administrator', 'kwargs': {}, 'async': True, 'job_name': u'frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts'}
Traceback (most recent call last):
  File "/home/administrator/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 95, in execute_job
    method(**kwargs)
  File "/home/administrator/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 215, in trigger_daily_alerts
    trigger_email_alerts(None, "daily")
  File "/home/administrator/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 227, in trigger_email_alerts
    evaluate_alert(doc, alert, alert.event)
  File "/home/administrator/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 266, in evaluate_alert
    frappe.log_error(message=frappe.get_traceback(), title=e)
  File "/home/administrator/frappe-bench/apps/frappe/frappe/__init__.py", line 1370, in log_error
    method=title)).insert(ignore_permissions=True)
  File "/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py", line 230, in insert
    self.db_insert()
  File "/home/administrator/frappe-bench/apps/frappe/frappe/model/base_document.py", line 303, in db_insert
    ), list(d.values()))
  File "/home/administrator/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
    self._cursor.execute(query, values)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 164, in execute
    query = self.mogrify(query, args)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 143, in mogrify
    query = query % self._escape_args(args, conn)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 118, in _escape_args
    return tuple(conn.literal(arg) for arg in args)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 118, in <genexpr>
    return tuple(conn.literal(arg) for arg in args)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 821, in literal
    return self.escape(obj, self.encoders)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 814, in escape
    return escape_item(obj, self.charset, mapping=mapping)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 27, in escape_item
    val = encoder(val, mapping)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 110, in escape_unicode
    return u"'%s'" % _escape_unicode(value)
  File "/home/administrator/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/converters.py", line 73, in _escape_unicode
    return value.translate(_escape_table)
AttributeError: 'OutgoingEmailError' object has no attribute 'translate'

#2

I have smellier error did you solve it


#3

Even i am facing same error