Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ModuleNotFoundError for "not-installed" app #26249

Open
ajiragroup opened this issue Apr 30, 2024 · 1 comment
Open

Getting ModuleNotFoundError for "not-installed" app #26249

ajiragroup opened this issue Apr 30, 2024 · 1 comment
Labels

Comments

@ajiragroup
Copy link
Contributor

I had downloaded "frappe_whatsapp" app on my production server that runs two instances of erpnext. This app "frapp_whatsapp" is installed in one instance only. (say: erp2.example.com) but not on erp1.example.com.

I found some problems with the app "frappe_whatsapp" and I tried to un-install it rom erp2 but failed.

Now erp2.example.com is throwing Internal server error.
And,
erp1.example.com gives this error:
image

App Versions

{
	"erpnext": "15.20.6",
	"frappe": "15.23.0",
	"hrms": "15.19.0",
	"payments": "0.0.1",
	"print_designer": "1.2.0"
}

Route

Workspaces/private/Home

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/utils/caching.py", line 55, in wrapper
    return frappe.local.request_cache[func][args_key]
KeyError: 5740354900026072187

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    init_request(request)
  File "apps/frappe/frappe/app.py", line 193, in init_request
    for before_request_task in frappe.get_hooks("before_request"):
  File "apps/frappe/frappe/__init__.py", line 1594, in get_hooks
    hooks = _dict(_load_app_hooks())
  File "apps/frappe/frappe/utils/caching.py", line 57, in wrapper
    return_val = func(*args, **kwargs)
  File "apps/frappe/frappe/__init__.py", line 1563, in _load_app_hooks
    app_hooks = get_module(f"{app}.hooks")
  File "apps/frappe/frappe/__init__.py", line 1429, 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 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  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 'frappe_whatsapp'

Request Data

{
	"type": "POST",
	"args": {
		"name": "leaderboard"
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.desk_page.getpage",
	"request_id": null
}

Response Data

{
	"exception": "ModuleNotFoundError: No module named 'frappe_whatsapp'",
	"exc_type": "ModuleNotFoundError"
}
@ajiragroup ajiragroup added the bug label Apr 30, 2024
@karanwilson
Copy link

karanwilson commented May 10, 2024

Hi @ajiragroup,

Please try:-
(for both sites)
bench --site site-name migrate

sudo supervisorctl restart all

@nabinhait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants