I added a custom application precisely Module Not Found Error.
- result from
sites/apps.txt
- result from
ls apps/
- result from
bench --site frontend install-app ui_theme
- the result
ModuleNotFoundError
ModuleNotFoundError: No module named ‘ui_theme’Traceback (most recent call last)
This is the Copy/Paste friendly version of the traceback.Traceback (most recent call last):
File “/home/user/frappe-bench/apps/frappe/frappe/app.py”, line 100, in application
init_request(request)
File “/home/user/frappe-bench/apps/frappe/frappe/app.py”, line 173, in init_request
frappe.init(site=site, sites_path=_sites_path, force=True)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 258, in init
setup_module_map(include_all_apps=not (frappe.request or frappe.job or frappe.flags.in_migrate))
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1658, in setup_module_map
for module in get_module_list(app):
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1506, in get_module_list
return get_file_items(get_app_path(app_name, “modules.txt”))
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1471, in get_app_path
return get_pymodule_path(app_name, *joins)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1501, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).file or “”), *joins))
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1442, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘ui_theme’During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/user/frappe-bench/apps/frappe/frappe/website/serve.py”, line 19, in get_response
endpoint, renderer_instance = path_resolver.resolve()
File “/home/user/frappe-bench/apps/frappe/frappe/website/path_resolver.py”, line 38, in resolve
resolve_redirect(self.path, request.query_string)
File “/home/user/frappe-bench/apps/frappe/frappe/website/path_resolver.py”, line 117, in resolve_redirect
redirects = frappe.get_hooks(“website_redirects”)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1607, in get_hooks
hooks = _dict(_load_app_hooks())
File “/home/user/frappe-bench/apps/frappe/frappe/utils/caching.py”, line 47, in wrapper
return func(*args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1576, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1442, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘ui_theme’During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/user/frappe-bench/apps/frappe/frappe/middlewares.py”, line 16, in call
return super().call(environ, start_response)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py”, line 250, in call
return self.app(environ, start_response)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py”, line 250, in call
return self.app(environ, start_response)
File “/home/user/frappe-bench/apps/frappe/frappe/app.py”, line 80, in application
app(environ, start_response),
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py”, line 190, in application
resp = f(*args[:-2] + (request,))
File “/home/user/frappe-bench/apps/frappe/frappe/app.py”, line 133, in application
response = handle_exception(e)
File “/home/user/frappe-bench/apps/frappe/frappe/permissions.py”, line 870, in wrapper
return fn(e, *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/app.py”, line 397, in handle_exception
response = get_response(“message”, http_status_code=http_status_code)
File “/home/user/frappe-bench/apps/frappe/frappe/website/serve.py”, line 23, in get_response
return handle_exception(e, endpoint, path, http_status_code)
File “/home/user/frappe-bench/apps/frappe/frappe/permissions.py”, line 870, in wrapper
return fn(e, *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/website/serve.py”, line 37, in handle_exception
return ErrorPage(exception=e).render()
File “/home/user/frappe-bench/apps/frappe/frappe/website/page_renderers/error_page.py”, line 7, in init
super().init(path=path, http_status_code=http_status_code)
File “/home/user/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py”, line 45, in init
self.set_template_path()
File “/home/user/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py”, line 54, in set_template_path
app_path = frappe.get_app_path(app)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1471, in get_app_path
return get_pymodule_path(app_name, *joins)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1501, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).file or “”), *joins))
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 1442, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘ui_theme’
is there a solution?