ModuleNotFoundError: No module named 'erpnext.exceptions' can't do anything

All of the sudden I am getting this error on my frappe installation.

I have done bench setup requirements, git pull under erpnext app folder, but nothing seems to help, the problem is on all site, please help

Traceback (most recent call last):
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 190, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/init.py”, line 808, in get_module
return importlib.import_module(modulename)
File “/home/frappe-user/frappe-bench/env/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/frappe-user/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 9, in
from erpnext.accounts.party import get_party_account, get_due_date
File “/home/frappe-user/frappe-bench/apps/erpnext/erpnext/accounts/party.py”, line 15, in
from erpnext.exceptions import PartyFrozen, PartyDisabled, InvalidAccountCurrency
ModuleNotFoundError: No module named ‘erpnext.exceptions’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/init.py”, line 1036, in call
return fn(*args, **newargs)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 71, in getdoctype
docs = get_meta_bundle(doctype)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 81, in get_meta_bundle
bundle = [frappe.desk.form.meta.get_meta(doctype)]
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 26, in get_meta
meta = FormMeta(doctype)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 39, in init
self.load_assets()
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 53, in load_assets
self.load_templates()
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/desk/form/meta.py”, line 178, in load_templates
module = load_doctype_module(self.name)
File “/home/frappe-user/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 192, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Sales Invoice (erpnext.accounts.doctype.sales_invoice.sales_invoice Error: No module named ‘erpnext.exceptions’)

After a bench update --reset, It all work out according to the next post, but the problem no idea how it was originated in the first place.

Its a bug.

The error says there does not exist a file or module named exceptions. That’s it.

yeah, it’s weird how it happens all of the sudden, I have same version running in another place 14 months without that glitch

I don’t know what say, except that I’m seeing this with the “easy install” script.