When I run this inside a docker container, I get the following error:
Command:
root@0ea3c762f393:/frappe/sites# python ../apps/frappe/frappe/utils/bench_helper.py frappe
Main error:
ModuleNotFoundError: No module named '-e frappe'
Full output:
root@0ea3c762f393:/frappe/sites# python ../apps/frappe/frappe/utils/bench_helper.py frappe version
Traceback (most recent call last):
File "/frappe/sites/../apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
main()
File "/frappe/sites/../apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/frappe/apps/frappe/frappe/commands/utils.py", line 1074, in get_version
frappe.init("")
File "/frappe/apps/frappe/frappe/__init__.py", line 248, in init
setup_module_map()
File "/frappe/apps/frappe/frappe/__init__.py", line 1516, in setup_module_map
for module in get_module_list(app):
File "/frappe/apps/frappe/frappe/__init__.py", line 1374, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
File "/frappe/apps/frappe/frappe/__init__.py", line 1323, in get_module
return importlib.import_module(modulename)
File "/usr/local/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 '-e frappe'