bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/patches.txt

Hello;

Since long time, I am using bench update --reset and it is working fine.
Now the current erpnext and frappe versions as below:

ERPNext: v10.1.77 (master)

Frappe Framework: v10.1.68 (master)

And I am facing the following error when doing bench update --reset:

./apps/patches.txt should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
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/patches.txt

I removed the patches.txt file but the bench update --reset is creating it again and the error is coming again. It seems that this patches.txt file is important.

So what is the problem? Is it bug and we have to wait patch?
Is it because version 11 is currently the master version or still not yet?

Regards
Bilal

does your env has any app custom app ? anything other than frappe/erpnext?

Yes I have custom application but I was doing upgrade and they are existed and I was not face any trouble.
But is there difference between having custom application and having them in the env?
If I removed the custom application, I will lose my database?
So what is the solution?

Regards
Bilal

By the way: this problem can be resolved by deleting the patches.txt at ./app/patches.txt but is that the proper solution?

Regards
Bilal

My understanding is it is fine as patches.txt is anyway empty for custom app.
For me making changes to setup.py inside old custom app worked as pip version is changed. Sol

try to run the command without flag like :

./env/bin/pip install -q ./apps/patches.txt
./env/bin/pip install ./apps/patches.txt

then see what the error

1 Like