Error Running Bench Update

Hi ,

I ran into the following error while trying to update the bench. Now my site is showing an Internal Server Error :frowning:
Please help

erpnext@ip-172-31-1-158:~/frappe-bench$ bench update --upgrade
INFO:bench.utils:updating bench
Already up-to-date.
remote: Counting objects: 45, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 45 (delta 23), reused 22 (delta 22), pack-reused 1
Unpacking objects: 100% (45/45), done.
From https://github.com/frappe/frappe
   55d17a6..e0a22a9  develop    -> upstream/develop
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            master     -> FETCH_HEAD
Auto-merging frappe/www/website_theme.py
Auto-merging frappe/www/website_theme.css
Auto-merging frappe/www/website_script.py
Auto-merging frappe/www/sitemap.py
Auto-merging frappe/www/rss.py
Auto-merging frappe/www/print.py
Auto-merging frappe/www/message.py
Auto-merging frappe/www/message.html
Auto-merging frappe/www/login.py
Auto-merging frappe/www/login.html
Auto-merging frappe/www/list.py
Auto-merging frappe/www/list.html
Auto-merging frappe/www/error.html
Auto-merging frappe/www/edit_profile.py
Auto-merging frappe/www/desk.py
Auto-merging frappe/www/desk.html
Auto-merging frappe/www/contact.html
Auto-merging frappe/www/about.html
Auto-merging frappe/www/__init__.py
Auto-merging frappe/www/404.html
Removing frappe/website/statics.py
Removing frappe/templates/pages/update-password.html
Removing frappe/templates/pages/me.py
Removing frappe/templates/pages/me.html
Removing frappe/templates/pages/edit-profile.html
Removing frappe/setup_logging.py
Removing frappe/public/less/offcanvas.less
Removing frappe/public/less/offcanvas-website.less
Removing frappe/public/js/lib/flot/jquery.flot.threshold.js
Removing frappe/public/js/lib/flot/jquery.flot.symbol.js
Removing frappe/public/js/lib/flot/jquery.flot.stack.js
Removing frappe/public/js/lib/flot/jquery.flot.selection.js
Removing frappe/public/js/lib/flot/jquery.flot.resize.js
Removing frappe/public/js/lib/flot/jquery.flot.pie.js
Removing frappe/public/js/lib/flot/jquery.flot.navigate.js
Removing frappe/public/js/lib/flot/jquery.flot.js
Removing frappe/public/js/lib/flot/jquery.flot.image.js
Removing frappe/public/js/lib/flot/jquery.flot.fillbetween.js
Removing frappe/public/js/lib/flot/jquery.flot.downsample.js
Removing frappe/public/js/lib/flot/jquery.flot.crosshair.js
Removing frappe/public/js/lib/flot/jquery.colorhelpers.js
Removing frappe/public/js/lib/flot/excanvas.min.js
Removing frappe/public/js/lib/flot/excanvas.js
Removing frappe/public/js/frappe/ui/toolbar/offcanvas_left_sidebar.html
Auto-merging frappe/email/queue.py
CONFLICT (content): Merge conflict in frappe/email/queue.py
Auto-merging frappe/email/doctype/newsletter/newsletter.json
Auto-merging frappe/email/doctype/email_queue/email_queue_list.js
Auto-merging frappe/email/doctype/email_queue/email_queue.js
Removing frappe/email/doctype/bulk_email/test_bulk_email.py
Removing frappe/email/doctype/bulk_email/bulk_email.py
Removing frappe/email/doctype/bulk_email/__init__.py
Removing frappe/email/doctype/bulk_email/README.md
Removing frappe/docs/user/fr/guides/portal-development/.md
Removing frappe/docs/user/en/guides/deployment/how-to-change-host-name-from-localhost.md
Removing frappe/docs/user/en/guides/deployment/checking-problems-in-bench.md
Auto-merging frappe/docs/user/en/bench/guides/configuring-https.md
Auto-merging frappe/core/doctype/user/user.py
CONFLICT (content): Merge conflict in frappe/core/doctype/user/user.py
Auto-merging frappe/core/doctype/communication/communication.py
CONFLICT (content): Merge conflict in frappe/core/doctype/communication/communication.py
Auto-merging frappe/core/doctype/communication/communication.json
CONFLICT (content): Merge conflict in frappe/core/doctype/communication/communication.json
Removing frappe/commands.py
Auto-merging frappe/boot.py
CONFLICT (content): Merge conflict in frappe/boot.py
Automatic merge failed; fix conflicts and then commit the result.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.92', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/erpnext/bench-repo/bench/commands/update.py", line 76, in _update
    pull_all_apps(bench_path=bench_path)
  File "/home/erpnext/bench-repo/bench/app.py", line 148, in pull_all_apps
    remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 130, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull  upstream master
erpnext@ip-172-31-1-158:~/frappe-bench$

Hello @wale ,

please check the conflict in frappe app & commit and retry bench update

Thanks,
Sagar Shiragawakar

Hi @sagar

how do I check the conflict and commit? Please assist with exact steps

Thanks

it will shows the path which file has an conflict.

Thanks,
Sagar Shiragawakar

Hi @sagar

I’ve seen the path to the files but then what do I do to fix the issue?

Thanks

Did you mean to make changes in boot.py?

If not then just run git reset --hard inside the erpnext folder.

Hi @vjFaLk,

Thanks for your input. I didn’t make any changes to that file (neither do I have any intentions to). I tried your suggestion and then returned to the frappe-bench folder to try updating again. I got the following error:

M       socketio.js
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.92', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/erpnext/bench-repo/bench/commands/update.py", line 76, in _update
    pull_all_apps(bench_path=bench_path)
  File "/home/erpnext/bench-repo/bench/app.py", line 148, in pull_all_apps
    remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 130, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull  upstream master
erpnext@ip-172-31-1-158:~/frappe-bench$

Any ideas?

Thanks