'could not find app "frappedesk"' on bench migrate, uninstall-app, get-app, install-app

I am stuck! After doing an innocent git pull in all apps nothing works anymore. Almost all bench commands complain about frappedesk being there or not being there with:

builtins.ModuleNotFoundError: no module named ‘frappedesk’

I’m a bit desperate since this was a nicely working installation. We don’t use frappedesk so we could let go of it, bench uninstall-app doesn’t work either.

What must one do?

Here’s the complete output

Traceback with variables (most recent call last):
File “”, line 198, in _run_module_as_main
mod_name = ‘frappe.utils.bench_helper’
alter_argv = True
mod_spec = ModuleSpec(name=‘frappe.utils.bench_helper’, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, origin=‘/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’)
code = <code object at 0x563b01a7aa40, file “/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 1>
main_globals = {‘name’: ‘main’, ‘doc’: None, ‘package’: ‘frappe.utils’, ‘loader’: <_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, ‘spec’: ModuleSpec(name=‘frappe.utils.bench_helper’, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, origin=‘/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’), ‘annotations’: {}, ‘builtins’: <module ‘builtins’ (built-in)>, ‘file’: ‘/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’, ‘cached’: ‘/var/www/frappe-bench/apps/frappe/frappe/utils/pycache/bench_helper.cpython-311.pyc’, ‘importlib’: <module ‘importlib’ from ‘/usr/local/lib/python3.11/importlib/init.py’>, ‘json’: <module ‘json’ from ‘/usr/local/lib/python3.11/json/init.py’>, ‘os’: <module ‘os’ (frozen)>, ‘traceback’: <module ‘traceback’ from ‘/usr/local/lib/python3.11/traceback.py’>, ‘warnings’: <module ‘warnings’ from ‘/usr/local/lib/python3.11/warnings.py’>, ‘click’: <module ‘click…
File “”, line 88, in _run_code
code = <code object at 0x563b01a7aa40, file “/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 1>
run_globals = {‘name’: ‘main’, ‘doc’: None, ‘package’: ‘frappe.utils’, ‘loader’: <_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, ‘spec’: ModuleSpec(name=‘frappe.utils.bench_helper’, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, origin=’/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’), ‘annotations’: {}, ‘builtins’: <module ‘builtins’ (built-in)>, ‘file’: ‘/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’, ‘cached’: ‘/var/www/frappe-bench/apps/frappe/frappe/utils/pycache/bench_helper.cpython-311.pyc’, ‘importlib’: <module ‘importlib’ from ‘/usr/local/lib/python3.11/importlib/init.py’>, ‘json’: <module ‘json’ from ‘/usr/local/lib/python3.11/json/init.py’>, ‘os’: <module ‘os’ (frozen)>, ‘traceback’: <module ‘traceback’ from ‘/usr/local/lib/python3.11/traceback.py’>, ‘warnings’: <module ‘warnings’ from ‘/usr/local/lib/python3.11/warnings.py’>, ‘click’: <module ‘click…
init_globals = None
mod_name = ‘main
mod_spec = ModuleSpec(name=‘frappe.utils.bench_helper’, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>, origin=’/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’)
pkg_name = ‘frappe.utils’
script_name = None
loader = <_frozen_importlib_external.SourceFileLoader object at 0x7f77160bc3d0>
fname = ‘/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py’
cached = ‘/var/www/frappe-bench/apps/frappe/frappe/utils/pycache/bench_helper.cpython-311.pyc’
File “/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
…skipped… 25 vars
File “/var/www/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
commands = {‘frappe’: , ‘get-frappe-commands’: , ‘get-frappe-help’: }
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
self =
args = ()
kwargs = {‘prog_name’: ‘bench’}
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
self =
args = [‘frappe’, ‘–site’, ‘erp.km-it.de’, ‘migrate’]
prog_name = ‘bench’
complete_var = None
standalone_mode = True
extra = {}
ctx = <click.core.Context object at 0x7f7714e9edd0>
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
self =
ctx = <click.core.Context object at 0x7f7714e9edd0>
_process_result = <function MultiCommand.invoke.._process_result at 0x7f77137344a0>
args = [‘migrate’]
cmd_name = ‘frappe’
cmd =
sub_ctx = <click.core.Context object at 0x7f77149e6d50>
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
self =
ctx = <click.core.Context object at 0x7f77149e6d50>
_process_result = <function MultiCommand.invoke.._process_result at 0x7f77135bf100>
args =
cmd_name = ‘migrate’
cmd =
sub_ctx = <click.core.Context object at 0x7f771379b490>
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
self =
ctx = <click.core.Context object at 0x7f771379b490>
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
args = ()
kwargs = {‘skip_failing’: False, ‘skip_search_index’: False}
self = <click.core.Context object at 0x7f771379b490>
callback = <function migrate at 0x7f771376afc0>
ctx = <click.core.Context object at 0x7f771379b490>
File “/var/www/frappe-bench/env/lib/python3.11/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
args = ()
kwargs = {‘skip_failing’: False, ‘skip_search_index’: False}
f = <function migrate at 0x7f771376ad40>
File “/var/www/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
ctx = <click.core.Context object at 0x7f771379b490>
args = ()
kwargs = {‘skip_failing’: False, ‘skip_search_index’: False}
profile = False
f = <function migrate at 0x7f771376aca0>
File “/var/www/frappe-bench/apps/frappe/frappe/commands/site.py”, line 560, in migrate
).run(site=site)
context = {‘sites’: [‘erp.km-it.de’], ‘force’: False, ‘verbose’: False, ‘profile’: False}
skip_failing = False
skip_search_index = False
activate_by_import = <module ‘traceback_with_variables.activate_by_import’ from ‘/var/www/frappe-bench/env/lib/python3.11/site-packages/traceback_with_variables/activate_by_import.py’>
SiteMigration = <class ‘frappe.migrate.SiteMigration’>
site = ‘erp.km-it.de
File “/var/www/frappe-bench/apps/frappe/frappe/migrate.py”, line 174, in run
self.pre_schema_updates()
self = <frappe.migrate.SiteMigration object at 0x7f77124815d0>
site = ‘erp.km-it.de
File “/var/www/frappe-bench/apps/frappe/frappe/migrate.py”, line 41, in wrapper
ret = method(*args, **kwargs)
args = (<frappe.migrate.SiteMigration object at 0x7f77124815d0>,)
kwargs = {}
method = <function SiteMigration.pre_schema_updates at 0x7f77115e0f40>
File “/var/www/frappe-bench/apps/frappe/frappe/migrate.py”, line 104, in pre_schema_updates
for fn in frappe.get_hooks(“before_migrate”, app_name=app):
self = <frappe.migrate.SiteMigration object at 0x7f77124815d0>
app = ‘frappedesk’
File “/var/www/frappe-bench/apps/frappe/frappe/init.py”, line 1493, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
hook = ‘before_migrate’
default = ‘_KEEP_DEFAULT_LIST’
app_name = ‘frappedesk’
File “/var/www/frappe-bench/apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
args = (‘frappedesk’,)
kwargs = {}
args_key = -8493435477717133873
func = <function _load_app_hooks at 0x7f771480f9c0>
File “/var/www/frappe-bench/apps/frappe/frappe/init.py”, line 1465, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
app_name = ‘frappedesk’
hooks = {}
apps = [‘frappedesk’]
app = ‘frappedesk’
types = <module ‘types’ from ‘/usr/local/lib/python3.11/types.py’>
File “/var/www/frappe-bench/apps/frappe/frappe/init.py”, line 1327, in get_module
return importlib.import_module(modulename)
modulename = ‘frappedesk.hooks’
File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
name = ‘frappedesk.hooks’
package = None
level = 0
File “”, line 1206, in _gcd_import
name = ‘frappedesk.hooks’
package = None
level = 0
File “”, line 1178, in find_and_load
name = ‘frappedesk.hooks’
import
= <function _gcd_import at 0x7f771624bd80>
module = <object object at 0x7f7716280050>
File “”, line 1128, in find_and_load_unlocked
name = ‘frappedesk.hooks’
import
= <function _gcd_import at 0x7f771624bd80>
path = None
parent = ‘frappedesk’
parent_spec = None
File “”, line 241, in _call_with_frames_removed
f = <function _gcd_import at 0x7f771624bd80>
args = (‘frappedesk’,)
kwds = {}
File “”, line 1206, in _gcd_import
name = ‘frappedesk’
package = None
level = 0
File “”, line 1178, in find_and_load
name = ‘frappedesk’
import
= <function _gcd_import at 0x7f771624bd80>
module = <object object at 0x7f7716280050>
File “”, line 1142, in find_and_load_unlocked
name = ‘frappedesk’
import
= <function _gcd_import at 0x7f771624bd80>
path = None
parent = ‘’
parent_spec = None
spec = None
builtins.ModuleNotFoundError: No module named ‘frappedesk’

I think Frappedesk is the former name of Helpdesk app . Are you using it?

no, not quite sure how it got in there.

But how does one get rid of it?

Hi,

What does `bench --site (sitename) list-apps return?

bench --site [sitename] list-apps:

frappe 14.28.2 version-14
erpnext 14.19.0 version-14
frappedesk 0.6.5 main
payments 0.0.1 develop
hrms 14.0.0 version-14

try: bench --site (sitename) remove-from-installed-apps frappedesk

if you haven’t already

3 Likes

have not…! And it is WORKING!!!

Jeez, I have been hackling with this almost a day now.

smino: where do I buy the drinks here?

1 Like

Hi @kombi:

Maybe frappedesk app remain on your apps directory, and database still contain app data … care about that if you are facing new issues.

Anyway … I think is not good idea mixing stable and develop branches and apps … specially in production environment. After a bunch of emergencies and headaches like this, we’ve completely separated production and developing/testing contexts.

Good to know everything is running again!
:vulcan_salute:

point taken avc! I wonder how the dev version of “payment” got in there (and what that module does anyway:) I usually try things out first on a local installation but as it happens, everything worked fine there but didn’t on the production box, Murphy’s I suppose.

Is witching back to stable just a matter of changing branches? I guess I should just try rather than ask…

Cheers,
kombi

Hi:

Payments app was a requirement for installing ERPNext. On early v14 versions, I think you have needed to install it manually. After splitting ERPNext on different apps it make sense, but would was a bit confusing.

This application contains connector with some payment plattforms like Paypal, Stripe, etc …
I think you can change to version-14 branch …

Cheers!