Attempting to switch to branch “version-13-beta” from “version-12” fails with error message “NameError: name ‘utils’ is not defined”. Attempting switch-to-branch “develop” fails in the same way.
Fwiw the server started with a clean install of Ubuntu 20.04 LTS and ERPNext was installed using install.py (Easy install setup guide for erpnext installation on Ubuntu 20.04 LTS. With some modification of course ).
Is there a simple workaround for this?
Thanks,
Dale
frappe@starlord:~/frappe-bench$ bench switch-to-branch version-13-beta frappe erpnext --upgrade
LOG: Fetching upstream unshallow for frappe
$ git remote set-branches upstream '*'
$ git fetch --all --unshallow
Fetching upstream
remote: Enumerating objects: 47241, done.
remote: Counting objects: 100% (40356/40356), done.
remote: Compressing objects: 100% (11777/11777), done.
remote: Total 38745 (delta 29630), reused 35598 (delta 26652), pack-reused 0
Receiving objects: 100% (38745/38745), 14.08 MiB | 5.21 MiB/s, done.
Resolving deltas: 100% (29630/29630), completed with 1083 local objects.
From https://github.com/frappe/frappe
* [new branch] SaiFi0102-patch-1 -> upstream/SaiFi0102-patch-1
* [new branch] assignment_rule -> upstream/assignment_rule
... <snip>
Switching for frappe
$ git checkout version-13-beta
Updating files: 100% (907/907), done.
Branch 'version-13-beta' set up to track remote branch 'version-13-beta' from 'upstream'.
Switched to a new branch 'version-13-beta'
LOG: Fetching upstream unshallow for erpnext
$ git remote set-branches upstream '*'
$ git fetch --all --unshallow
Fetching upstream
remote: Enumerating objects: 46956, done.
remote: Counting objects: 100% (35862/35862), done.
remote: Compressing objects: 100% (11559/11559), done.
remote: Total 33465 (delta 25512), reused 28869 (delta 21281), pack-reused 0
Receiving objects: 100% (33465/33465), 34.54 MiB | 5.89 MiB/s, done.
Resolving deltas: 100% (25512/25512), completed with 1659 local objects.
From https://github.com/frappe/erpnext
* [new branch] delivery_note -> upstream/delivery_note
* [new branch] dependabot/npm_and_yarn/lodash-4.17.19 -> upstream/dependabot/npm_and_yarn/lodash-4.17.19
... <snip>
Switching for erpnext
$ git checkout version-13-beta
Updating files: 100% (1725/1725), done.
Branch 'version-13-beta' set up to track remote branch 'version-13-beta' from 'upstream'.
Switched to a new branch 'version-13-beta'
SUCCESS: Successfully switched branches for: frappe, erpnext
Please run `bench update --patch` to be safe from any differences in database schema
Updating Python libraries...
$ ./env/bin/pip install -q -U pip
INFO:bench.app:installing frappe
$ ./env/bin/pip install -q -U -e ./apps/frappe
INFO:bench.app:installing erpnext
$ ./env/bin/pip install -q -U -e ./apps/erpnext
Updating node packages...
$ yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.4.1" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.4.1" has unmet peer dependency "popper.js@^1.16.0".
[4/4] Building fresh packages...
$ yarn run snyk-protect
yarn run v1.22.4
$ snyk protect
Successfully applied Snyk patches
Done in 54.68s.
Done in 1055.49s.
$ yarn install
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ yarn run snyk-protect
yarn run v1.22.4
$ snyk protect
Successfully applied Snyk patches
Done in 7.68s.
Done in 114.63s.
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/frappe/.bench/bench/cli.py", line 41, in cli
bench_command()
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/frappe/.bench/bench/commands/update.py", line 43, in switch_to_branch
switch_to_branch(branch=branch, apps=list(apps), upgrade=upgrade)
File "/home/frappe/.bench/bench/app.py", line 417, in switch_to_branch
switch_branch(branch, apps=apps, bench_path=bench_path, upgrade=upgrade)
File "/home/frappe/.bench/bench/app.py", line 409, in switch_branch
reload_module(utils)
NameError: name 'utils' is not defined
frappe@starlord:~/frappe-bench$