Installing HRMS app fails

I am trying to install HRMS app using following command

bench get-app hrms --resolve-deps

But I am getting follow error and installation fails.

yogesh@vmi934079:~/erp14$ bench get-app hrms --resolve-deps
ERROR: Invalid frappe path: erpnext
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 71, in is_valid_frappe_branch
    res = g.ls_remote("--heads", "--tags", frappe_path, frappe_branch)
  File "/usr/local/lib/python3.10/dist-packages/git/cmd.py", line 545, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git ls-remote --heads --tags erpnext version-14
  stderr: 'fatal: 'erpnext' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 156, in get_app
    get_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 363, in get_app
    resolution = make_resolution_plan(app, bench)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 288, in make_resolution_plan
    is_valid_frappe_branch(dep_app.url, dep_app.branch)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 77, in is_valid_frappe_branch
    raise InvalidRemoteException(f"Invalid frappe path: {frappe_path}")
bench.exceptions.InvalidRemoteException: Invalid frappe path: erpnext
yogesh@vmi934079:~/erp14$

Think to note here is that ERPNext is working just great and I also managed to install india_compliance app successfully.

What is the problem and how to solve it?

Regards,

Hi @yogeshvachhani,

Can you try this command?

bench get-app hrms

//OR

bench get-app hrms https://github.com/frappe/hrms.git

If not worked then remove/reinstall the app.
Then check it.

Thank You!

1 Like

I have done everything in my power.

If I follow what you have suggested the app does got downloaded and installed in ERPNext but then in ERPNext I am getting this errors.


ModuleNotFoundError

ModuleNotFoundError: No module named 'hrms'
Traceback (most recent call last)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/serve.py", line 17, in get_response

    endpoint, renderer_instance = path_resolver.resolve()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/path_resolver.py", line 51, in resolve

    renderer_instance = renderer(endpoint, 200)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/static_page.py", line 17, in __init__

    self.set_file_path()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/static_page.py", line 24, in set_file_path

    file_path = frappe.get_app_path(app, "www") + "/" + self.path

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1365, in get_app_path

    return get_pymodule_path(app_name, *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1382, in get_pymodule_path

    return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__ or ""), *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1336, 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 1004, in _find_and_load_unlocked
    During handling of the above exception, another exception occurred:
    File "/home/yogesh/erp14/apps/frappe/frappe/app.py", line 78, in application

    response = get_response()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/serve.py", line 27, in get_response

    response = ErrorPage(exception=e).render()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/error_page.py", line 7, in __init__

    super().__init__(path=path, http_status_code=http_status_code)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/template_page.py", line 43, in __init__

    self.set_template_path()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/template_page.py", line 52, in set_template_path

    app_path = frappe.get_app_path(app)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1365, in get_app_path

    return get_pymodule_path(app_name, *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1382, in get_pymodule_path

    return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__ or ""), *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1336, 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 1004, in _find_and_load_unlocked
    During handling of the above exception, another exception occurred:
    File "/home/yogesh/erp14/apps/frappe/frappe/website/serve.py", line 17, in get_response

    endpoint, renderer_instance = path_resolver.resolve()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/path_resolver.py", line 51, in resolve

    renderer_instance = renderer(endpoint, 200)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/static_page.py", line 17, in __init__

    self.set_file_path()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/static_page.py", line 24, in set_file_path

    file_path = frappe.get_app_path(app, "www") + "/" + self.path

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1365, in get_app_path

    return get_pymodule_path(app_name, *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1382, in get_pymodule_path

    return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__ or ""), *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1336, 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 1004, in _find_and_load_unlocked
    During handling of the above exception, another exception occurred:
    File "/home/yogesh/erp14/apps/frappe/frappe/middlewares.py", line 16, in __call__

    return super().__call__(environ, start_response)

    File "/home/yogesh/erp14/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py", line 247, in __call__

    return self.app(environ, start_response)

    File "/home/yogesh/erp14/env/lib/python3.10/site-packages/werkzeug/middleware/shared_data.py", line 247, in __call__

    return self.app(environ, start_response)

    File "/home/yogesh/erp14/env/lib/python3.10/site-packages/werkzeug/local.py", line 196, in application

    return ClosingIterator(app(environ, start_response), self.cleanup)

    File "/home/yogesh/erp14/env/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 187, in application

    resp = f(*args[:-2] + (request,))

    File "/home/yogesh/erp14/apps/frappe/frappe/app.py", line 90, in application

    response = handle_exception(e)

    File "/home/yogesh/erp14/apps/frappe/frappe/app.py", line 287, in handle_exception

    response = get_response("message", http_status_code=http_status_code)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/serve.py", line 27, in get_response

    response = ErrorPage(exception=e).render()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/error_page.py", line 7, in __init__

    super().__init__(path=path, http_status_code=http_status_code)

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/template_page.py", line 43, in __init__

    self.set_template_path()

    File "/home/yogesh/erp14/apps/frappe/frappe/website/page_renderers/template_page.py", line 52, in set_template_path

    app_path = frappe.get_app_path(app)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1365, in get_app_path

    return get_pymodule_path(app_name, *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1382, in get_pymodule_path

    return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__ or ""), *joins)

    File "/home/yogesh/erp14/apps/frappe/frappe/__init__.py", line 1336, 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 1004, in _find_and_load_unlocked

    ModuleNotFoundError: No module named 'hrms'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

    dump() shows all variables in the frame
    dump(obj) dumps all that's known about the object

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

Can you detect any problem here?

Regards,

If I uninstall the app using the commands:

bench --site sitename uninstall-app hrms
bench restart

Everything starts working properly.

Regards,

it helps thank you