I had an issue with the HRMS module, so I tried to uninstall the HRMS module and got the below error; ERPNext has been used by a Docker Container.
frappe@79f32e9e137d:~/frappe-bench$ bench --site [sitename] uninstall-app hrms --force
Uninstalling App hrms from Site [sitename]...
All doctypes (including custom), modules related to this app will be deleted. Are you sure you want to continue? [y/N]: y
Backing up...
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 962, in uninstall
remove_app(app_name=app, dry_run=dry_run, yes=yes, no_backup=no_backup, force=force)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 389, in remove_app
frappe.get_attr(before_uninstall)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1708, in get_attr
return getattr(get_module(modulename), methodname)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1429, in get_module
return importlib.import_module(modulename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/frappe/frappe-bench/apps/hrms/hrms/uninstall.py", line 3, in <module>
from hrms.setup import before_uninstall as remove_custom_fields
File "/home/frappe/frappe-bench/apps/hrms/hrms/setup.py", line 5, in <module>
from frappe.desk.page.setup_wizard.install_fixtures import (
ImportError: cannot import name '_' from 'frappe.desk.page.setup_wizard.install_fixtures' (/home/frappe/frappe-bench/apps/frappe/frappe/desk/page/setup_wizard/install_fixtures.py)