ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: No module named 'frappe.website.render')

Hey Guys,

I am getting this error while installing of erpnext in ubuntu 20
ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: No module named ‘frappe.website.render’)

Thanks
Eliyas

Hi,

It may help to say which method you are using to install, and the command that produced the message.

Hey smino,

Thanks for response i am using this command bench --site erp install-app erpnext to install erpnext

Installing erpnext…
Updating DocTypes for erpnext : [ ] 1%An error occurred while installing erpnext: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: No module named ‘frappe.website.render’)
Traceback (most recent call last):
File “apps/frappe/frappe/modules/utils.py”, line 235, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “apps/frappe/frappe/init.py”, line 1246, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 848, in exec_module
File “”, line 219, in _call_with_frames_removed
File “apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py”, line 12, in
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry, get_company_defaults
File “apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 11, in
from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
File “apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py”, line 8, in
from erpnext.controllers.accounts_controller import AccountsController
File “apps/erpnext/erpnext/controllers/accounts_controller.py”, line 12, in
from erpnext.buying.utils import update_last_purchase_rate
File “apps/erpnext/erpnext/buying/utils.py”, line 10, in
from erpnext.stock.doctype.item.item import get_last_purchase_details
File “apps/erpnext/erpnext/stock/doctype/item/item.py”, line 13, in
from erpnext.setup.doctype.item_group.item_group import (get_parent_item_groups, invalidate_cache_for)
File “apps/erpnext/erpnext/setup/doctype/item_group/item_group.py”, line 11, in
from frappe.website.render import clear_cache
ModuleNotFoundError: No module named ‘frappe.website.render’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 417, in install_app
_install_app(app, verbose=context.verbose)
File “apps/frappe/frappe/installer.py”, line 271, in install_app
sync_for(name, force=True, reset_permissions=True)
File “apps/frappe/frappe/model/sync.py”, line 95, in sync_for
import_file_by_path(
File “apps/frappe/frappe/modules/import_file.py”, line 145, in import_file_by_path
import_doc(
File “apps/frappe/frappe/modules/import_file.py”, line 244, in import_doc
doc.insert()
File “apps/frappe/frappe/model/document.py”, line 273, in insert
self.run_post_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1060, in run_post_save_methods
self.run_method(“on_update”)
File “apps/frappe/frappe/model/document.py”, line 918, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1240, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 1222, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/document.py”, line 915, in fn
return method_object(*args, **kwargs)
File “apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 390, in on_update
self.run_module_method(“on_doctype_update”)
File “apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 465, in run_module_method
module = load_doctype_module(self.name, self.module)
File “apps/frappe/frappe/modules/utils.py”, line 237, in load_doctype_module
raise ImportError(
ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: No module named ‘frappe.website.render’)

May we know the output of: bench version and the get-app command used to get frappe and erpnext?

Bench version is 5.8.1

frappe command which i used bench init frappe-bench --frappe-branch version-13

and for ERPNext bench get-app --branch version-13 erpnext

1 Like

I might try bench setup --requirements then bench update and try installing the app to the site again. Do you know if you are on develop or production?

I am trying to install on bench version 5.11.0. But the erpnext setup throws the same error. Any recommended solution.

I had the same error message then I installed erpNext version 14 … and the error was gone:

> bench get-app erpnext --branch version-14

1 Like