Can't update to Bench 5.21.0 → 5.22.3

I’m running bench update but it gives me this error:

$ git pull upstream main
fatal: couldn’t find remote ref main
ERROR: git pull upstream main
subprocess.CalledProcessError: Command ‘git pull upstream main’ returned non-zero exit status 1.

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 “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/bench/commands/update.py”, line 59, in update
update(
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 456, in update
pull_apps(apps=apps, bench_path=bench_path, reset=reset)
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 817, in pull_apps
bench.run(f"git pull {rebase} {remote} {branch}", cwd=app_dir)
File “/usr/local/lib/python3.10/dist-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: git pull upstream main

Any clue?

Hi,

What does: pip3 install frappe-bench --upgrade return?

1 Like

Hey @smino that one worked, Thanks! I was able to update Bench to 5.22.3, any reason why bench update didn’t work?

I believe bench update updates the apps (frappe, erpnext), not frappe-bench itself. If there is an update to frappe-bench available , there is usually a message at the end of bench update. If bench update still fails, there may be other issues in play.

2 Likes

I see, seems like the bench update --bench command is no longer available. Update bench to newer version - Frappe Forum

Thanks!