Bench update error


i wonder why i cant do bench update, its give me this error :
sigma@GSI2:~/frappe-bench$ bench update
remote: Counting objects: 56, done.
remote: Compressing objects: 100% (56/56), done.
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/sigma/bench-repo/bench/”, line 36, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/”, line 609, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 589, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 935, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 781, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/sigma/bench-repo/bench/”, line 151, in update
File “/home/sigma/bench-repo/bench/”, line 139, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/sigma/bench-repo/bench/”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘git pull’ returned non-zero exit status 1

please advise


Did you, by mistake, run bench update as root in the past?

As root, run the following.

chown -R sigma /home/sigma/bench-repo/
chown -R sigma /home/sigma/frappe-bench/apps

the error stil occured :
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 62 (delta 35), reused 0 (delta 0)
Unpacking objects: 100% (62/62), done.
From GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
ce23b23…9c72d0a master → origin/master
Updating ce23b23…9c72d0a
bench/ | 13 ++++++++±-
bench/ | 53 +++++++++++++++++++++++±-------------------
bench/ | 14 +++++++±—
bench/ | 45 +++++++++++++++++++++++++++++++++++++
bench/ | 22 +++++++++++±-----
bench/templates/nginx.conf | 53 +++++++++++++++++++++++++++++++++±---------
bench/ | 39 ++++++++++++++++++++++++++++++±
install_scripts/ | 16 +++++++±----
8 files changed, 199 insertions(+), 56 deletions(-)
create mode 100644 bench/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/usr/local/lib/python2.7/dist-packages/”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python2.7/dist-packages/”, line 2472, in load_entry_point
return ep.load()
File “/usr/local/lib/python2.7/dist-packages/”, line 2186, in load
File “/home/sigma/bench-repo/bench/”, line 22, in
from .migrate_to_v5 import migrate_to_v5
File “/home/sigma/bench-repo/bench/”, line 2, in
from .release import get_current_version
File “/home/sigma/bench-repo/bench/”, line 5, in
import semantic_version
ImportError: No module named semantic_version

how ?

This is a different issue,
Run sudo pip install --upgrade -e /home/sigma/bench-repo and try again

wow this works thanks…