We are on ERPNext: v11.x.x-develop (2da6b3d) (develop) and Frappe Framework: v11.x.x-develop (ff83f97) (develop) versions. Ever since we enabled 2 factor authentication, we are getting following error in the error log every 6 minutes.
{‘retry’: 0, ‘log’: <function log at 0x7f5fc766f398>, ‘site’: u’el.cyahi.com’, ‘event’: u’all’, ‘method_name’: u’frappe.twofactor.delete_all_barcodes_for_users’, ‘method’: <function delete_all_barcodes_for_users at 0x7f5fc763baa0>, ‘user’: u’Administrator’, ‘kwargs’: {}, ‘async’: True, ‘job_name’: u’frappe.twofactor.delete_all_barcodes_for_users’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 97, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/twofactor.py”, line 376, in delete_all_barcodes_for_users
if not two_factor_is_enabled():
File “/home/frappe/frappe-bench/apps/frappe/frappe/twofactor.py”, line 32, in two_factor_is_enabled
user_doc = frappe.get_doc(“User”, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 641, in get_doc
return frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in init
self.load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 141, in load_from_db
frappe.throw((“{0} {1} not found”).format((self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 327, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 313, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 286, in _raise_exception
raise raise_exception(msg)
DoesNotExistError: User None not found
Can somebody please help?