URGENT - ERPNext broken after update to v11

Hey guys,
So I thought by just doing a normal bench update would just move me from the latest version of v10 to the stable v11 - WRONG

Now both my ERPNexts are broken and I got only a couple of hours to fix it before business opens in the morning.

After trying a few things by myself, I give up and ask for help. Let’s start with what I get now when I use bench update:

frappe@server2:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
/bin/sh: 1: ./env/bin/pip: not found
Please install these dependencies using the command:
sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 70, in _update
before_update(bench_path=bench_path, requirements=requirements)
File “/home/frappe/bench-repo/bench/utils.py”, line 759, in before_update
validate_pillow_dependencies(bench_path, requirements)
File “/home/frappe/bench-repo/bench/utils.py”, line 767, in validate_pillow_dependencies
exec_cmd(“{pip} install Pillow”.format(pip=pip))
File “/home/frappe/bench-repo/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install Pillow

P.S: I installed python3, I migrated the environment and it didn’t work - got errors there too - what can it be ?

Thank you in advance for the help.


There was an issue with supervisor - killed the processes, restarted supervisor and it seems to work fine now.

good to hear you have saved your ass this time and thanks for posting the solution here for others.

But … I’d highly recommend you to consider whether taking a snapshot of your server (if you are running in a VM, container or a filesystem like btrfs, or ZFS) before any such operations would not help to prevent disaster.

Also cloning your production server first, making the critical operation, and only whether it works, execute it on your production system (which you still would snapshot before the update) would be a reasonable consideration.

The way you seem to have done this looks like begging for trouble


You are very right about taking extra safety precautions - I got a back-up system happening every 3 hours so this way I can always roll-back the VPS if necessary.

However, I must say - there is so much information on updating from v10 to v11 - you get lost and don’t know what to follow.

Now as trying to migrate to python3 - bunch of more errors appear and can’t seem to find any information on this yet.

I don’t believe p3 is regarded production ready in the ERPNext cosmos yet. I’d wait till ‘official’ announcement from the Frappe core team on that matter till I’d update a production server to p3 to be honest.

Also I believe p3.6 is used in all automated code testing for erpnext/frappe, so it would be the version of choice over 3.5 (which on debian 9 i.e. is the default python3 version)

General procedure for update would be setting up a new server, copying your old database there, and then upgrading the system, then switching the IPs or Domain Names. And a trial run similar to this before doing anything on production is a must.

Someone should post this information somewhere - really big and during installation it should not be recommending to upgrade to python3