Upgrade fails when updating ERPNext v8.0.65 to v9.1.5

Hi Team,

We have tried all given methods on forum but alas, we are running down at the same problem. We are sharing the traceback error logs with you.

:~/frappe-bench$ bench version
erpnext 9.1.5
frappe 9.1.7

When we run the “bench version” command we can see our frappe and erpnext version updated to 9.1.5 but when we open the web interface we get an error message “Your system is being updated. Please refresh again after a few moments”.

Kindly help us with the updation process as this is our production box we need to fix this ASAP.

Traceback Error :

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/os3/.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/os3/.bench/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/home/os3/.bench/bench/commands/update.py”, line 74, in _update
update_requirements(bench_path=bench_path)
File “/home/os3/.bench/bench/utils.py”, line 410, in update_requirements
install_requirements(pip, req_file)
File “/home/os3/.bench/bench/utils.py”, line 446, in install_requirements
exec_cmd(“{pip} install -q -r {req_file}”.format(pip=pip, req_file=req_file))
File “/home/os3/.bench/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext/requirements.txt

Have you tried restarting your production box?

A good idea too to update the server host

sudo apt-get update

Hi,

Yes we have tried restarting the production box, but still error persist.
Kindly suggest further steps.

Regards,
Tejal Thakur

Sr. Technical Executive - PreSales

+91 98339 80352 | tejal.thakur@os3infotech.com

This search gives lots of ideas:

"
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
"

Here’s one if you have not already followed that advice Error on upgradation v6-v7 - #4 by KanchanChauhan

From your frappe-bench dir:
./env/bin/pip install --upgrade pip

After this I would
sudo service nginx reload
sudo supervisorctl restart all
bench update

Hi,

I was able to resolve this issue by making the change in
$HOME/frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_print_zero_amount_taxes.py

Below are the changes that were made :-
#############################################################
from future import unicode_literals
import frappe

from erpnext.setup.install import create_print_zero_amount_taxes_custom_field

def execute():
frappe.reload_doc(“printing”, “doctype”, “print_style”)
create_print_zero_amount_taxes_custom_field()
###############################################################

1 Like