Error on Bench Update (V8)

Versions:
ERPNext: v8.0.40 (master)
Frappe Framework: v8.0.60 (master)

bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating bee3de4…88bc56f
error: Your local changes to the following files would be overwritten by merge:
playbooks/develop/includes/wkhtmltopdf.yml
vm/ansible/roles/wkhtmltopdf/tasks/main.yml
Please, commit your changes or stash them before you can merge.
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 35, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 245, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

You have files changed in your bench-repo
go to the folder and clear all modifications shown in git status.
Did you edit the wkhtmltopdf.yml ? maybe updated the url ?
simply reset it :wink:

git reset --hard

Hi @fahimalizain! I actually did that already and this is in production. :smiley: I believe there were no changes done in the repo as I have double chekced with git status . Anyway, I have done git reset --hard for both frappe and erpnext. But still having the issue.

This issue is in bench repo. not frappe nor erpnext :smiley:

1 Like

do git checkout -- in your bench folder (frappe-bench/.bench)

Thanks @rmehta ! I’ll try it out.

@rmehta @fahimalizain did a git checkout – but was behind with 3 commits so had to pull but pointing me to the error so I did git reset --hard in the bench repo and is working now. Thanks!