Hi,
I have a frappe.cloud Databasis, and want to install for testing purpuses a local bench. I installed ERPNext sucessfully, but when I want to migrate the bench there is an error that the module “email_delivery_service” can not be found.
frappe@xxx-All-Series:~/frappe-bench/sites$ bench migrate
Migrating sawcomponents.erpnext
Could not find app "email_delivery_service":
No module named 'email_delivery_service'
Queued rebuilding of search index for xxx.erpnext
Traceback with variables (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
mod_name = 'frappe.utils.bench_helper'
alter_argv = True
mod_spec = ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7feb0d7cbd30>, origin='/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py')
code = <code object <module> at 0x7feb0c0123f0, file "/home/frappe/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 0x7feb0d7cbd30>, '__spec__': ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7feb0d7cbd30>, origin='/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py'), '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': '/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py', '__cached__': '/home/frappe/frappe-bench/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc', 'importlib': <module 'importlib' from '/usr/lib/python3.10/importlib/__init__.py'>, 'json': <module 'json' from '/usr/lib/python3.10/json/__init__.py'>, 'os': <module 'os' from '/usr/lib/python3.10/os.py'>, 'traceback': <module 'traceback' from '/usr/lib/python3.10/traceback.py'>, 'warnings': <module 'warnings' from '/usr/lib/python3.10/warnings.py'>, 'Path': <cl...
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
code = <code object <module> at 0x7feb0c0123f0, file "/home/frappe/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 0x7feb0d7cbd30>, '__spec__': ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7feb0d7cbd30>, origin='/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py'), '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': '/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py', '__cached__': '/home/frappe/frappe-bench/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc', 'importlib': <module 'importlib' from '/usr/lib/python3.10/importlib/__init__.py'>, 'json': <module 'json' from '/usr/lib/python3.10/json/__init__.py'>, 'os': <module 'os' from '/usr/lib/python3.10/os.py'>, 'traceback': <module 'traceback' from '/usr/lib/python3.10/traceback.py'>, 'warnings': <module 'warnings' from '/usr/lib/python3.10/warnings.py'>, 'Path': <cl...
init_globals = None
mod_name = '__main__'
mod_spec = ModuleSpec(name='frappe.utils.bench_helper', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7feb0d7cbd30>, origin='/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py')
pkg_name = 'frappe.utils'
script_name = None
loader = <_frozen_importlib_external.SourceFileLoader object at 0x7feb0d7cbd30>
fname = '/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py'
cached = '/home/frappe/frappe-bench/apps/frappe/frappe/utils/__pycache__/bench_helper.cpython-310.pyc'
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
main()
...skipped... 27 vars
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
commands = {'frappe': <Group frappe>, 'get-frappe-commands': <Command get-frappe-commands>, 'get-frappe-help': <Command get-frappe-help>}
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
self = <Group None>
args = ()
kwargs = {'prog_name': 'bench'}
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
self = <Group None>
args = ['frappe', 'migrate']
prog_name = 'bench'
complete_var = None
standalone_mode = True
windows_expand_args = True
extra = {}
ctx = <click.core.Context object at 0x7feb0c01a080>
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
_process_result = <function MultiCommand.invoke.<locals>._process_result at 0x7feb0c022290>
args = ['migrate']
cmd_name = 'frappe'
cmd = <Group frappe>
sub_ctx = <click.core.Context object at 0x7feb0bc35900>
ctx = <click.core.Context object at 0x7feb0c01a080>
self = <Group None>
__class__ = <class 'click.core.MultiCommand'>
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
_process_result = <function MultiCommand.invoke.<locals>._process_result at 0x7feb0bc27520>
args = []
cmd_name = 'migrate'
cmd = <Command migrate>
sub_ctx = <click.core.Context object at 0x7feb0bc35c60>
ctx = <click.core.Context object at 0x7feb0bc35900>
self = <Group frappe>
__class__ = <class 'click.core.MultiCommand'>
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
self = <Command migrate>
ctx = <click.core.Context object at 0x7feb0bc35c60>
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
_Context__self = <click.core.Context object at 0x7feb0bc35c60>
_Context__callback = <function migrate at 0x7feb0bef7eb0>
args = ()
kwargs = {'skip_failing': False, 'skip_search_index': False}
ctx = <click.core.Context object at 0x7feb0bc35c60>
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
args = ()
kwargs = {'skip_failing': False, 'skip_search_index': False}
f = <function migrate at 0x7feb0bef7c70>
File "/home/frappe/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 0x7feb0bc35c60>
args = ()
kwargs = {'skip_failing': False, 'skip_search_index': False}
profile = False
f = <function migrate at 0x7feb0bef7be0>
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 726, in migrate
SiteMigration(
context = {'sites': ['sawcomponents.erpnext'], 'force': False, 'verbose': False, 'profile': False}
skip_failing = False
skip_search_index = False
activate_by_import = <module 'traceback_with_variables.activate_by_import' from '/home/frappe/frappe-bench/env/lib/python3.10/site-packages/traceback_with_variables/activate_by_import.py'>
SiteMigration = <class 'frappe.migrate.SiteMigration'>
site = 'sawcomponents.erpnext'
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 184, in run
self.pre_schema_updates()
self = <frappe.migrate.SiteMigration object at 0x7feb0bc35a80>
site = 'sawcomponents.erpnext'
filelock = <function filelock at 0x7feb091d4ca0>
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 52, in wrapper
raise e
args = (<frappe.migrate.SiteMigration object at 0x7feb0bc35a80>,)
kwargs = {}
method = <function SiteMigration.pre_schema_updates at 0x7feb091d4790>
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 44, in wrapper
ret = method(*args, **kwargs)
args = (<frappe.migrate.SiteMigration object at 0x7feb0bc35a80>,)
kwargs = {}
method = <function SiteMigration.pre_schema_updates at 0x7feb091d4790>
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 110, in pre_schema_updates
for fn in frappe.get_hooks("before_migrate", app_name=app):
self = <frappe.migrate.SiteMigration object at 0x7feb0bc35a80>
app = 'email_delivery_service'
fn = 'frappe.core.doctype.patch_log.patch_log.before_migrate'
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1572, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
hook = 'before_migrate'
default = '_KEEP_DEFAULT_LIST'
app_name = 'email_delivery_service'
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/caching.py", line 57, in wrapper
return_val = func(*args, **kwargs)
args = ('email_delivery_service',)
kwargs = {}
args_key = -2341550361184011229
func = <function _load_app_hooks at 0x7feb0c017400>
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1544, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
app_name = 'email_delivery_service'
hooks = {}
apps = ['email_delivery_service']
app = 'email_delivery_service'
types = <module 'types' from '/usr/lib/python3.10/types.py'>
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1410, in get_module
return importlib.import_module(modulename)
modulename = 'email_delivery_service.hooks'
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
name = 'email_delivery_service.hooks'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
name = 'email_delivery_service.hooks'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
name = 'email_delivery_service.hooks'
import_ = <function _gcd_import at 0x7feb0e17f400>
module = <object object at 0x7feb0e1a4060>
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
name = 'email_delivery_service.hooks'
import_ = <function _gcd_import at 0x7feb0e17f400>
path = None
parent = 'email_delivery_service'
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
f = <function _gcd_import at 0x7feb0e17f400>
args = ('email_delivery_service',)
kwds = {}
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
name = 'email_delivery_service'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
name = 'email_delivery_service'
import_ = <function _gcd_import at 0x7feb0e17f400>
module = <object object at 0x7feb0e1a4060>
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
name = 'email_delivery_service'
import_ = <function _gcd_import at 0x7feb0e17f400>
path = None
parent = ''
spec = None
builtins.ModuleNotFoundError: No module named 'email_delivery_service'
I know the app can be only used in the cloud, so I want to delete it. But I do not find it in the apps.txt
and I also can’t delete it.
when I run
bench uninstall-app email_delivery_service
Same error occurs.
"ModuleNotFoundError: No module named ‘email_delivery_service’ "
But when I list all apps it shows:
frappe@xxx-All-Series:~/frappe-bench/sites$ bench --site all list-apps --format json
{
"xxx.erpnext": [
"frappe",
"erpnext",
"email_delivery_service",
"hrms",
"payments",
"print_designer",
"helpdesk"
]
}
Can someone help me to migrate the bench?