Need a help error when do bench update

Error when do bench update erpnext production.

frappe@erppro:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Updating 7a007a2…5ce9cb2
    error: Your local changes to the following files would be overwritten by merge:
    frappe/init.py
    frappe/core/doctype/doctype/doctype.py
    frappe/custom/doctype/customize_form/customize_form.py
    frappe/oauth.py
    frappe/public/js/frappe/form/control.js
    frappe/public/js/frappe/form/formatters.js
    frappe/public/js/frappe/form/toolbar.js
    frappe/public/js/frappe/misc/number_format.js
    frappe/public/js/frappe/ui/editor.html
    frappe/utils/data.py
    frappe/website/js/website.js
    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 62, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
    File “/home/frappe/.bench/bench/commands/update.py”, line 78, in _update
    pull_all_apps(bench_path=bench_path, reset=reset)
    File “/home/frappe/.bench/bench/app.py”, line 146, in pull_all_apps
    remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
    File “/home/frappe/.bench/bench/utils.py”, line 127, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: git pull upstream master

HI @jnainggolan,

please check this How to commit or stash changes - #3 by hereabdulla

Thanks

result same …
still error after
cd ~/.bench
git commit -a -m"Own Message"
cd frappe-bench/
bench update

error still same.

@jnainggolan,

You will need to add the changes before commit, use the git add command.

e.g. git add --all then git commit -m"your commit message"

Thanks,
Makarand

Helo @makarand_b already, but still have same error

cd apps/frappe
git stash
cd …
cd apps/erpnext
git stash
cd …
bench update

works for me before i get the same error

regards

1 Like

For me it solved the problem:

cd apps/frappe
git reset --hard
cd -
cd apps/erpnext
git reset --hard
cd -
bench switch-to-master

hope it helps

1 Like

Thanks it’s running well …

Thanks it’s running well

Ah, I am now getting this problem on V8 upgrade.

Previously the following usually did the trick… but not this time

cd /home/frappe/frappe-bench/apps/frappe
git reset --hard
cd /home/frappe/frappe-bench/apps/erpnext
git reset --hard
cd /home/frappe/frappe-bench
bench switch-to-master
bench update --upgrade

( I don’t want to commit changes). Git Stash doesn’t work either.

git status, gives:

frappe@erpnext:~/frappe-bench/apps/erpnext$ git status
On branch master
Your branch is up-to-date with ‘upstream/master’.

Untracked files:
(use “git add …” to include in what will be committed)

erpnext/accounts/doctype/account/._account.js
erpnext/accounts/doctype/payment_entry/._payment_entry.js
erpnext/accounts/doctype/payment_entry/._payment_entry.py

nothing added to commit but untracked files present (use “git add” to track)

Thanks

Ben

git add . fixed it.

1 Like