Hi,
i am trying to update from version 9.2.3 to the latest version but run into this error:
playbooks/prerequisites/ubuntu.yml
playbooks/production/in
Aborting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 256, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
i have tried several options including updating the base os (Debian) yet i am hitting the same error.
Can anyone help figure out what could be wrong? Will appreciate the help.
Hello @flexy2ky.
Do you have git installed on the machine?
Regards,
Ivan
Yes i have git installed. Refer to the last 2 lines below:
playbooks/production/in
Aborting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 256, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
amishatotalconcepts@amisha-online:/home/frappe/frappe-bench$ git --version
git version 2.1.4
Have you made changes to the server-side software?
I assume not. Therefore:
do:
1.frappe@ip:~/frappe-bench$ bench switch-to-master
2.frappe@ip:~/frappe-bench$ git reset --hard
3. frappe@ip:~/frappe-bench/apps/frappe$ git reset --hard
4.frappe@ip:~/frappe-bench/apps/erpnext$ git reset --hard
switches all apps including bench to master branch. You might need to do git stash in each of the folders in the apps to temporarily shelve or stash server-side changes. Once this is done, do the magical step:
5.frappe@ip:~/frappe-bench$ sudo bench update --reset
If you get permission issues, use “sudo” and do the update. note: if not frappe user: ~/frappe/frappe-bench/ is the folder path.
@fineco
Well i haven’t made any changes to the server side software myself but the installed instance runs on GCP so i would not be surprised if changes were made automatically.
As for the fix you proffered, i followed the steps above and everything went well without a hitch, except that the update still fails at the same point.
@flexy2ky
I had forgotten one more folder:
5.frappe@ip:~/.bench$ git reset --hard
If this does not work, try git pull in each of the app folders and see what detailed errors you get, and in which app.
This fixed the issue! Thank you the update has now been completed!
1 Like