Bench update give me error v13

when i try to run bench update i get this error

hof@nextv13:~/frappe-bench$ bench update
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/hof/.bench/bench/", line 41, in cli
  File "/usr/lib/python3/dist-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/", line 555, in invoke
return callback(*args, **kwargs)
  File "/home/hof/.bench/bench/commands/", line 25, in update
update(pull=pull, patch=patch, build=build, requirements=requirements, resta                                                                                            rt_supervisor=restart_supervisor, restart_systemd=restart_systemd, backup=not no                                                                                            _backup, force=force, reset=reset)
  File "/home/hof/.bench/bench/", line 175, in update
  File "/home/hof/.bench/bench/", line 451, in validate_branch
branch = get_current_branch(app)
  File "/home/hof/.bench/bench/", line 301, in get_current_branch
return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
  File "/home/hof/.bench/bench/", line 491, in get_cmd_output
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess                                                                                            .PIPE).strip()
  File "/usr/lib/python3.8/", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'basename $(git symbolic-ref -q HEAD)' re                                                                                            turned non-zero exit status 1.

git stash result:

No local changes to save`

git status result:

Not currently on any branch.
nothing to commit, working tree clean

bench version result:

erpnext 13.1.0
frappe 13.1.0
hof 0.0.1

take in conider that new installtion
and i am using cutom linux user named “hof” instaed if “frappe” user

and this the command i used during the insatlltion

bench init /home/hof/frappe-bench --frappe-path --frappe-branch v13.1.0 --python python3

bench get-app erpnext --branch v13.1.0

I really appreciate your help in advance

What happens if you try:

cd /frappe-bench/apps/frappe
git pull
1 Like
hof@nextv13:~/frappe-bench/apps/frappe$ git pull
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>


     cd ~/frappe-bench/
    bench switch-to-branch version-13 --upgrade frappe

many thanks worked with me

bench switch-to-branch version-13 --upgrade frappe erpnext
bench update --patch

I believe your error is in specifying :

--branch v13.1.0

There is no such branch!

Instead try:

bench get-app erpnext --branch version-13
1 Like