I am facing this error when trying to submit expense claim;
Traceback (most recent call last):
File “/home/octo5/frappe-bench/apps/frappe/frappe/email/doctype/notification/notification.py”, line 321, in evaluate_alert
File “/home/octo5/frappe-bench/apps/frappe/frappe/email/doctype/notification/notification.py”, line 120, in send
File “/home/octo5/frappe-bench/apps/frappe/frappe/email/doctype/notification/notification.py”, line 253, in load_standard_properties
module = get_doc_module(self.module, self.doctype, self.name)
File “/home/octo5/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 37, in get_doc_module
File “/home/octo5/frappe-bench/apps/frappe/frappe/init.py”, line 808, in get_module
File “/home/octo5/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 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘erpnext.accounts.notification.expense_claim_request.expense_claim_request’
How can i fix?
Yes that module is not there - there’s just this one erpnext/erpnext/accounts/notification/notification_for_new_fiscal_year at develop · frappe/erpnext · GitHub
The question is - has expense_claim_request moved or perhaps been refactored out of existence?
@clarkej It beats me why this error is now showing up. Just two weeks ago, expense claim requests worked without any issues so my guess is something was changed in last update because i pushed the latest update just yesterday.
Does anyone know a solution to this problem? Still stuck on this error.
Still hoping that someone can point me to how to resolve this.
try to disable or temporary delete the relevant notifications for expenses claim to confirm it caused by this.
@szufisher I did create a notification for expense claim earlier but i have since deleted it. The issue however persists. I don’t know how creating an email alert could have broken the module and i don’t know how to fix it.
If the file is not found in your updated instance, check to confirm the file has been deleted?
just checked Account notification and HR notification directories and there’s no history showing such file being deleted.
Still hoping for someone to point me to a solution to this problem.
I have retraced my steps and found that creating a custom alert for Expense Claim broke the system. I followed the standard process for creating alerts and i have other alerts running for different processes and nothing like this ever happened. Even though i have since deleted the custom alert created, the issue still persists. I cannot submit Expense Claims as it throws a notification error and would not submit. Any guide on how to fix this will be appreciated.
You best resolve the origins of this - what version is this found in?
Umm point me to the file in question thanks!
That’s the thing, i have checked the directories listed in the traceback and there are no files or directories relating to expense_claim_request either in Accounts or HR as shown in the error. That’s why i am confused. I set up a temporary instance and checked the directory and there’s no file like that. However, Expense Claim requests on the fresh instance submitted successfully.
Yes that is odd to me - that Expense Claim Request is not specified on the file system!? I have not seen or am not aware of that form of DocType; one that is defined and limited to the database. Someone better informed may need to chime in here.
I am sincerely hoping someone can point me in the direction of resolution. I have tried to replicate the issue on another instance to try to identify what’s broken without success. There’s no module expense_claim_request either in a fresh instance or instances with data. I also set up custom email alert for the test instance set up and it didn’t “break” the expense claim “module”. I am in a fix as I don’t know what else to do.
Well the answer lies in your database, to dig into that, and also to run your instances in a debugger, you would surely learn and resolve what is going on.
try to delete /home/octo5/frappe-bench/apps/frappe/frappe/email/doctype/notification/notification.pyc, then bench restart, open your browser and create your expense clain again, then check whether the delelted .pyc file regenerated.
if problem can not be resolved, please kindly contact me via skype.
@clarkej can you please close this thread now? Thanks.