Lots of frappe.email.queue.flush errors in the log

Finally have ERPNext 7 installed :slight_smile:

However looking at the Scheduler log I’m seeing dozens of this message.

I have four email accounts setup, all but one of them have a password. The one without the password is sending email via a local server’s SMTP service (relay) which might be causing the “AuthenticationError: Password not found” portion in the error message below.

I would put the password in that password-less account but it’s always rejected by the email server (this only happens in ERPNext).

Does anyone have any idea how to suppress the errors without disabling email or how to configure ERPNext to be able to login to the SMTP server properly. Or can anyone tell if the error is even related to the SMTP login for the one email account that doesn’t use a password?

Also this is my “Default Outgoing/Sending” email account in ERPNext.

{'retry': 0, 'log': <function log at 0x7f7b6983eed8>, 'site': u'mywebsite', 'event': u'all', 'method_name': u'frappe.email.queue.flush', 'method': <function flush at 0x7f7b697be6e0>, 'user': u'Administrator', 'kwargs': {}, 'async': True, 'job_name': u'frappe.email.queue.flush'}
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 61, in execute_job
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 251, in flush
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 143, in check_email_limit
    smtp_server = SMTPServer()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 130, in __init__
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 133, in setup_email_account
    self.email_account = get_outgoing_email_account(raise_exception_not_set=False, append_to=append_to)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 54, in get_outgoing_email_account
    email_account = get_default_outgoing_email_account(raise_exception_not_set=raise_exception_not_set)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 82, in get_default_outgoing_email_account
    email_account.password = email_account.get_password()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 597, in get_password
    return get_decrypted_password(self.doctype, self.name, fieldname, raise_exception=raise_exception)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/password.py", line 19, in get_decrypted_password
    frappe.throw(_('Password not found'), frappe.AuthenticationError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 299, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 292, in msgprint
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 265, in _raise_exception
    raise raise_exception, encode(msg)
AuthenticationError: Password not found

Have you tried to create a email account with password ang used it in ERPNext?

I switched email systems. Is there any way to bulk clear the Scheduler Log?

you can bench --site mysql. and do a sql delete for scheduler log.