Getting error when updating erp

Hi
i am on version 14 and when i am trying to update erp its gives this error.

fatal: ambiguous argument ‘upstream/version-14’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
ERROR:
subprocess.CalledProcessError: Command ‘git reset --hard upstream/version-14’ returned non-zero exit status 128.

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

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/frappe/.local/lib/python3.10/site-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 “/home/frappe/.local/lib/python3.10/site-packages/bench/commands/update.py”, line 59, in update
update(
File “/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py”, line 442, in update
pull_apps(apps=apps, bench_path=bench_path, reset=reset)
File “/home/frappe/.local/lib/python3.10/site-packages/bench/app.py”, line 659, in pull_apps
bench.run(reset_cmd, cwd=app_dir)
File “/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/home/frappe/.local/lib/python3.10/site-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError

Hi @zahidshuja,

Please check the installation step in the blog.

Thank You!

Have you tried with bench update --reset?

Yes i did , but same error

I followed those steps, but upon updating the bench version, I encountered an error. before bench version it was working fine.
how can we update python 3.10 to 3.11 any idea?

Hi @zahidshuja,

You can follow these steps:

  1. First, make sure that your system is up to date by running the following command in the terminal:

    sudo apt update && sudo apt upgrade
    
  2. Next, install the “deadsnakes” PPA, which provides packages for multiple versions of Python:

    sudo add-apt-repository ppa:deadsnakes/ppa
    
  3. Update your package list again:

    sudo apt update
    
  4. Finally, install Python 3.11 using the following command:

    sudo apt install python3.11
    

Thank You!

Followed same step but still getting error

fatal: ambiguous argument ‘upstream/version-14’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
ERROR:
subprocess.CalledProcessError: Command ‘git reset --hard upstream/version-14’ re turned non-zero exit status 128.

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

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/frappe/.local/lib/python3.10/site-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 “/home/frappe/.local/lib/python3.10/site-packages/bench/commands/update.p y”, line 59, in update
update(
File “/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py”, line 442, in update
pull_apps(apps=apps, bench_path=bench_path, reset=reset)
File “/home/frappe/.local/lib/python3.10/site-packages/bench/app.py”, line 659 , in pull_apps
bench.run(reset_cmd, cwd=app_dir)
File “/home/frappe/.local/lib/python3.10/site-packages/bench/bench.py”, line 4 8, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/init.py ", line 158, in exec_cmd
raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd )
bench.exceptions.CommandFailedError

In this post

there seems to be a working solution

2 Likes

Thankx its working