Cannot install HRMS in ERP14

Hello,

I am trying to install HRMS using following command

bench get-app --resolve-deps hrms

But it is failing. Here is the output.

ERROR: Invalid frappe path: erpnext
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 73, 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.'

The above exception was the direct cause of the following exception:

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 127, in cli
    bench_command()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 159, in get_app
    get_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 360, in get_app
    resolution = make_resolution_plan(app, bench)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 285, 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 79, in is_valid_frappe_branch
    raise InvalidRemoteException(f"Invalid frappe path: {frappe_path}") from e
bench.exceptions.InvalidRemoteException: Invalid frappe path: erpnext

I tried this on two separate PC with same result.

How to solve this?

TIA

Yogi Yang

Hi @YogiYang,

Please check it.
Maybe help you.

1 Like

Hello,

Thanks the command

bench get-app hrms

Worked for me. I had to remove --resolve-deps!

But still it is surprising as to why it fails with --resolve-deps?

TIA

Yogi Yang

@YogiYang,
I think, In hrms do not require dependencies and maybe it should be auto-set via the default command.

Thank You!

Hello,

Actually it does have dependency on payments. If we just bench get-app hrms and then try to install app on site immediately it gives error that payments is missing and installation fails.

This means that there is dependency and the command bench get-app --resolve-deps hrms should really work.

TIA

Yogi Yang

Hmm :thinking:

I believe the order of installation is as follows
Bench → payments → erpnext → hrms
I followed this and did not face any issue.
Both HRMS and Payroll working like a charm in v14

3 Likes

Hi im using ERPNEXT in docker for development purpose, i failed installing the HRMS module…
showing this :point_down:t4::point_down:t4::point_down:t4:

Could not find app “erpnext”:
No module named ‘erpnext’
An error occurred while installing hrms: No module named ‘erpnext’
Traceback (most recent call last):
File “apps/frappe/frappe/utils/caching.py”, line 55, in wrapper
return frappe.local.request_cache[func][args_key]
KeyError: 6587555841144985758

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 416, in install_app
_install_app(app, verbose=context.verbose, force=force)
File “apps/frappe/frappe/installer.py”, line 269, in install_app
install_app(required_app, verbose=verbose, force=force)
File “apps/frappe/frappe/installer.py”, line 262, in install_app
app_hooks = frappe.get_hooks(app_name=name)
File “apps/frappe/frappe/init.py”, line 1493, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
File “apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
File “apps/frappe/frappe/init.py”, line 1465, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
File “apps/frappe/frappe/init.py”, line 1327, in get_module
return importlib.import_module(modulename)
File “/home/frappe/.pyenv/versions/3.10.5/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘erpnext’

used bench get-app hrms and bench --site sitename install-app hrms commands