Switch-to-branch version-12 failure due to custom app

I have uninstalled mycustomApp then passed
bench switch-to-branch version-12 --upgrade
but still get error as if my customApp is still intalled
How best can I get past this
[frappe@service frappe-bench]$ bench switch-to-branch version-12 --upgrade
/usr/lib/python2.7/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn’t match a supported version!
RequestsDependencyWarning)
Switching for frappe
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch ‘+refs/heads/:refs/remotes/upstream/
INFO:bench.utils:git fetch upstream
INFO:bench.utils:git checkout version-12
Switched to branch ‘version-12’
INFO:bench.utils:git merge upstream/version-12
Already up-to-date.
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File “/usr/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/lib64/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 138, in switch_to_branch
switch_to_branch(branch=branch, apps=list(apps), upgrade=upgrade)
File “/home/frappe/.bench/bench/app.py”, line 397, in switch_to_branch
switch_branch(branch, apps=apps, bench_path=bench_path, upgrade=upgrade)
File “/home/frappe/.bench/bench/app.py”, line 361, in switch_branch
version_upgrade = is_version_upgrade(app=app, bench_path=bench_path, branch=branch)
File “/home/frappe/.bench/bench/app.py”, line 260, in is_version_upgrade
upstream_version = get_upstream_version(app=app, branch=branch, bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 327, in get_upstream_version
contents = subprocess.check_output([‘git’, ‘show’, ‘upstream/{branch}:{app}/init.py’.format(branch=branch, app=app)], cwd=repo_dir, stderr=subprocess.STDOUT)
File “/usr/lib64/python2.7/subprocess.py”, line 575, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘[‘git’, ‘show’, ‘upstream/version-12:mycustomApp/init.py’]’ returned non-zero exit status 128
[frappe@service frappe-bench]$

1 Like

This worked for me - bench switch-to-branch version-12 frappe erpnext --upgrade

1 Like

urllib3 problem - check that you have it installed, and that it’s the right version

I installed latest versions of urllib3 and chardet and the error disappeared