Error when trying to execute bench update --upgrade

Hi!
My server is Debian 8 Jessie x64. I got the following error when trying to run the update command (bench update --upgrade) inside ‘frappe-bench’ directory via SSH. Can anyone please help?

`
root@vps108358:/home/frappe/frappe-bench# bench update --upgrade
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 https://github.com/frappe/frappe

  • branch master -> FETCH_HEAD
    Updating fecf3fb…ca2604d
    error: Your local changes to the following files would be overwritten by merge:
    README.md
    frappe/init.py
    frappe/api.py
    frappe/app.py
    frappe/boot.py
    frappe/build.py
    frappe/config/desk.py
    frappe/config/desktop.py
    frappe/config/setup.py
    frappe/config/website.py
    frappe/core/doctype/communication/communication.js
    frappe/core/doctype/communication/communication.json
    frappe/core/doctype/communication/communication.py
    frappe/core/doctype/communication/communication_list.js
    frappe/core/doctype/docfield/docfield.json
    frappe/core/doctype/docperm/docperm.json
    frappe/core/doctype/docshare/docshare.json
    frappe/core/doctype/doctype/boilerplate/controller.js
    frappe/core/doctype/doctype/boilerplate/controller.py
    frappe/core/doctype/doctype/boilerplate/test_controller.py
    frappe/core/doctype/doctype/doctype.js
    frappe/core/doctype/doctype/doctype.json
    frappe/core/doctype/doctype/doctype.py
    frappe/core/doctype/error_log/error_log.json
    frappe/core/doctype/error_snapshot/error_snapshot.json
    frappe/core/doctype/file/file.json
    frappe/core/doctype/file/file_list.js
    frappe/core/doctype/language/language.json
    frappe/core/doctype/module_def/module_def.json
    frappe/core/doctype/page/page.json
    frappe/core/doctype/page/page.py
    frappe/core/doctype/page_role/README.md
    frappe/core/doctype/page_role/init.py
    frappe/core/doctype/page_role/page_role.json
    frappe/core/doctype/page_role/page_role.py
    frappe/core/doctype/patch_log/patch_log.json
    frappe/core/doctype/report/report.js
    frappe/core/doctype/report/report.json
    frappe/core/doctype/report/report.py
    frappe/core/doctype/report/test_report.py
    frappe/core/doctype/report/user_activity_report.json
    frappe/core/doctype/role/role.json
    frappe/core/doctype/role/role.py
    frappe/core/doctype/system_settings/system_settings.json
    frappe/core/doctype/tag_category/tag_category.json
    frappe/core/doctype/translation/test_translation.py
    frappe/core/doctype/translation/translation.js
    frappe/core/doctype/translation/translation.json
    frappe/core/doctype/user/test_records.json
    frappe/core/doctype/user/test_user.py
    frappe/core/doctype/user/user.js
    frappe/core/doctype/user/user.json
    frappe/core/doctype/user/user.py
    frappe/core/doctype/userrole/README.md
    frappe/core/doctype/userrole/init.py
    frappe/core/doctype/userrole/userrole.json
    frappe/core/doctype/userrole/userrole.py
    frappe/core/doctype/version/version.js
    frappe/core/doctype/version/version.json
    frappe/core/doctype/version/version.py
    frappe/core/notifications.py
    frappe/core/page/background_jobs/background_jobs.py
    frappe/core/page/data_import_tool/data_import_main.html
    frappe/core/page/data_import_tool/data_import_tool.js
    frappe/core/page/data_import_tool/data_import_tool.py
    frappe/core/page/data_import_tool/data_import_tool_columns.html
    frappe/core/page/data_import_tool/importer.py
    frappe/core/page/desktop/desktop.js
    frappe/core/page/desktop/desktop_icon_grid.html
    frappe/core/page/permission_manager/permission_manager.js
    frappe/core/page/permission_manager/permission_manager.py
    frappe/core/page/user_permissions/user_permissions.js
    frappe/core/page/user_permissions/user_permissions.py
    frappe/core/report/document_share_report/document_share_report.json
    frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.json
    frappe/core/report/todo/todo.json
    frappe/custom/doctype/custom_field/custom_field.js
    frappe/custom/doctype/custom_field/custom_field.json
    frappe/custom/doctype/custom_field/custom_field.py
    frappe/custom/doctype/custom_script/custom_script.json
    frappe/custom/doctype/customize_form/customize_form.js
    frappe/custom/doctype/customize_form/customize_form.json
    frappe/custom/doctype/customize_form/customize_form.py
    frappe/custom/doctype/customize_form/test_customize_form.py
    frappe/custom/doctype/customize_form_field/customize_form_field.json
    frappe/custom/doctype/property_setter/property_setter.json
    frappe/custom/doctype/property_setter/property_setter.py
    frappe/data/Framework.sql
    frappe/data/app_listing/knowledge_base.json
    frappe/data/app_listing/poll.json
    frappe/d
    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

`

I have the same error, and I type these command git pull upstream master in the path:
…/apps/frappe$git pull upstream master

still not working to me

make sure your apps/frappe$ git status, clear. if you have made some change, then do git checkout. try to upgrade again

Hi, I had a similar problem with Debian 8 x64 and I can solve this with this, maybe it will help you :

frappe-bench$ cd apps/frappe
frappe-bench$ git reset --hard
frappe-bench$ git pull

frappe-bench$ cd apps/erpnext
frappe-bench$ git reset --hard
frappe-bench$ git pull

bench update --requirements

bench update --upgrade

2 Likes