I have been battling to get ERP Next working on my Ubuntu system with the following error “ModuleNotFoundError: No module named ‘mint’“
Initially I just done the same as usual, export backup from the cloud, import it into my ubuntu for local testing and development. Then after I had installed all apps, build, migrate etc I get the below error.
This kept happening. I even went as far back as uninstalling bench itself and reinstalling everything.
The cursed error
```
ModuleNotFoundError
ModuleNotFoundError: No module named 'mint'
Traceback (most recent call last)
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/serve.py", line 19, in get_response
endpoint, renderer_instance = path_resolver.resolve()
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/path_resolver.py", line 68, in resolve
renderer_instance = renderer(endpoint, self.http_status_code)
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/page_renderers/static_page.py", line 31, in __init__
self.set_file_path()
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/page_renderers/static_page.py", line 38, in set_file_path
app_path = Path(frappe.get_app_path(app, "www"))
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 846, in get_app_path
def get_app_path(app_name, *joins):
"""Return path of given app.
:param app: App name.
:param *joins: Join additional path elements using `os.path.join`."""
return get_pymodule_path(app_name, *joins)
def get_app_source_path(app_name, *joins):
"""Return source path of given app.
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 876, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).__file__ or ""), *joins))
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 817, 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 "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
During handling of the above exception, another exception occurred:
File "/home/humpty/frappe-bench/apps/frappe/frappe/app.py", line 133, in application
response = get_response()
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/serve.py", line 23, in get_response
return handle_exception(e, endpoint, path, http_status_code)
File "/home/humpty/frappe-bench/apps/frappe/frappe/permissions.py", line 894, in wrapper
return fn(e, *args, **kwargs)
File "/home/humpty/frappe-bench/apps/frappe/frappe/website/serve.py", line 37, in handle_exception
return NotPermittedPage(endpoint, http_status_code, exception=e).render()
if isinstance(e, frappe.PageDoesNotExistError):
return NotFoundPage(endpoint, http_status_code).render()
return ErrorPage(exception=e).render()
def get_response_content(path=None, http_status_code=200) -> str:
response = get_response(path, http_status_code)
return str(response.data, "utf-8")
File "/home/humpty/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/humpty/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 45, in __init__
self.set_template_path()
File "/home/humpty/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/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 846, in get_app_path
return get_pymodule_path(app_name, *joins)
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 876, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).__file__ or ""), *joins))
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 817, 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 "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
During handling of the above exception, another exception occurred:
File "/home/humpty/frappe-bench/apps/frappe/frappe/middlewares.py", line 16, in __call__
return super().__call__(environ, start_response)
File "/home/humpty/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/humpty/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/humpty/frappe-bench/apps/frappe/frappe/app.py", line 84, in application
app(environ, start_response),
File "/home/humpty/frappe-bench/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 193, in application
resp = f(*args[:-2] + (request,))
File "/home/humpty/frappe-bench/apps/frappe/frappe/app.py", line 139, in application
response = e.get_response(request.environ) if isinstance(e, HTTPException) else handle_exception(e)
File "/home/humpty/frappe-bench/apps/frappe/frappe/permissions.py", line 894, in wrapper
return fn(e, *args, **kwargs)
File "/home/humpty/frappe-bench/apps/frappe/frappe/app.py", line 398, in handle_exception
response = ErrorPage(
File "/home/humpty/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/humpty/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 45, in __init__
self.set_template_path()
File "/home/humpty/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/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 846, in get_app_path
return get_pymodule_path(app_name, *joins)
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 876, in get_pymodule_path
return abspath(join(dirname(get_module(scrub(modulename)).__file__ or ""), *joins))
File "/home/humpty/frappe-bench/apps/frappe/frappe/__init__.py", line 817, 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 "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mint'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.