Bench update --reset and python setup.py egg_info" failed with error code 1

Hello;

I have 3 custom applications other than ERPNext and one of these custom application was created before one and half year, I am getting the below error which is related to this custom application (taxi application).

I found the this post (Create new app failed with error Command "python setup.py egg_info" failed with error code 1 - #16 by kolotayo) that might help which is talking about the setup.py file that need to modify a line code in it, but in my case, the setup.py contains also another code than the post is talking about it, anyway: I will post the setup.py file. What is the solution in this case?

The traceback is appearing below:

INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (18.1)
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q -e ./apps/frappe
INFO:bench.app:installing notary
INFO:bench.utils:./env/bin/pip install -q -e ./apps/notary
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q -e ./apps/erpnext
INFO:bench.app:installing taxi
INFO:bench.utils:./env/bin/pip install -q -e ./apps/taxi
Command “python setup.py egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/taxi/
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 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/.bench/bench/commands/update.py”, line 76, in _update
update_requirements(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 434, in update_requirements
install_app(app, bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 179, in install_app
find_links=find_links))
File “/home/frappe/.bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/taxi

And below is the setup.py file:

-- coding: utf-8 --

from setuptools import setup, find_packages
from pip.req import parse_requirements
import re, ast

get version from version variable in taxi/init.py

version_re = re.compile(r’_ version__\s+=\s+(.*)')

with open(‘taxi/__ init__.py’, ‘rb’) as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode(‘utf-8’)).group(1)))

requirements = parse_requirements(“requirements.txt”, session=“”)

setup(
name=‘taxi’,
version=version,
description=‘Taxi is ERPNext Module to manage Taxi Booking Business’,
author=‘Bilal Ghayad’,
author_email=‘bilal@ghayad.com’,
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires=[str(ir.req) for ir in requirements],
dependency_links=[str(ir._link) for ir in requirements if ir._link]
)

Again, the other custom applications is not giving any error. If I uninstalled and removed taxi application, then the update is moving fine. So what is the solution?

Regards
Bilal

Custom apps are (normally) secondary to the functionality of the main system. You may have to disable/uninstall the custom app before you run your update, and then reinstall it afterwards

This is resolved using this link:

Regards
Bilal