How to upgrade ERPNext app to v11 (branch develop)

Yes I tried it as well on a system running no custom apps.

I have also tried it with after un installing erpnext from site1.local and reinstalling erpnext to site1.local and still only see from the gui

Installed Apps

ERPNext: v10.1.51

Frappe Framework: v10.1.46

From the command line:

erpnext 11.x.x-develop
frappe 11.x.x-develop

Assuming one or the other is right, the question is which one and why the other is not.

Perhaps the problem is just a caching issue

You have tried ‘bench reinstall’?

I went so far as to drop the site add the site back reinstall erpenxt go through the wizard and still to no avail.

ok for comparison in my case I get this - I am on develop branch:

frappe@ubuntu:~/frappe-bench$ cd apps/frappe/
frappe@ubuntu:~/frappe-bench/apps/frappe$ git status
On branch develop
Your branch is up-to-date with ‘upstream/develop’.
nothing to commit, working directory clean
frappe@ubuntu:~/frappe-bench/apps/frappe$ cd …/erpnext/
frappe@ubuntu:~/frappe-bench/apps/erpnext$ git status
On branch develop
nothing to commit, working directory clean

frappe@ubuntu:~/frappe-bench$ cat ./apps/erpnext/erpnext/init.py | grep version
version = ‘10.1.48’
frappe@ubuntu:~/frappe-bench$ cat ./apps/erpnext/frappe/init.py | grep version
cat: ./apps/erpnext/frappe/init.py: No such file or directory
frappe@ubuntu:~/frappe-bench$ cat ./apps/frappe/frappe/init.py | grep version
version = ‘10.1.45’
frappe@ubuntu:~/frappe-bench$

frappe@ubuntu:~/frappe-bench$ bench version
erpnext 11.x.x-develop
frappe 11.x.x-develop

[latte@erp10-jb ~/frappe-bench]$ cd apps/frappe/ && git status
On branch develop
Your branch is up to date with ‘upstream/develop’.

nothing to commit, working tree clean
[latte@erp10-jb ~/frappe-bench/apps/frappe]$ cat frappe/init.py | grep version
version = ‘10.1.46’
[latte@erp10-jb ~/frappe-bench/apps/frappe]$ cd …/erpnext/ && git status
On branch develop
Your branch is up to date with ‘upstream/develop’.

nothing to commit, working tree clean
[latte@erp10-jb ~/frappe-bench/apps/erpnext]$ cat erpnext/init.py | grep version
version = ‘10.1.49’

[latte@erp10-jb ~/frappe-bench]$ bench version
erpnext 11.x.x-develop
frappe 11.x.x-develop

This system has other installed apps but its the same for the ones we have with out installed apps

installed-apps

Here’s the js code:

What do you get for this:

In [1]: import frappe

In [2]: frappe.utils.change_log.get_versions()
Out[2]:
{u’erpnext’: {u’branch’: u’develop’,
u’branch_version’: u’11.x.x-develop (af370c8)‘,
u’description’: u’ERP made simple’,
u’title’: u’ERPNext’,
u’version’: u’10.1.48’},
u’frappe’: {u’branch’: u’develop’,
u’branch_version’: u’11.x.x-develop (c564b4b)‘,
u’description’: u’Full stack web framework with Python, Javascript, MariaDB, Redis, Node’,
u’title’: u’Frappe Framework’,
u’version’: u’10.1.45’}}

[latte@erp10-jake ~/frappe-bench]$
[latte@erp10-jake ~/frappe-bench]$ bench use site1.local
[latte@erp10-jake ~/frappe-bench]$ bench console
/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/IPython/core/history.py:228: UserWarning: IPython History requires SQLite, your history will not be saved
warn(“IPython History requires SQLite, your history will not be saved”)

In [1]: import frappe

In [2]: frappe.utils.change_log.get_versions()
Out[2]:
{u’erpnext’: {u’branch’: u’develop’,
u’branch_version’: u’11.x.x-develop (32dc3bf)‘,
u’description’: u’ERP made simple’,
u’title’: u’ERPNext’,
u’version’: u’10.1.51’},
u’frappe’: {u’branch’: u’develop’,
u’branch_version’: u’11.x.x-develop (0b1e62a)‘,
u’description’: u’Full stack web framework with Python, Javascript, MariaDB, Redis, Node’,
u’title’: u’Frappe Framework’,
u’version’: u’10.1.46’}}

Well it seems the issue is just the Installed Apps GUI does not report you are actually on develop, with your change from master to develop.

My guess is this code has a bug

Perhaps someone can advise how to ‘reset’ the version state so the GUI reports the truth here!

Any downside to switching my organization to V11 develop right now? There are some features in there we need desperately but i don’t want to break anything although not much was modified in terms of customization.

Develop branch is not stable, so updates could break your installation.

@cpurbaugh your right about that, as I am now having the following issues with updating this system:

[latte@erp10-jb ~/frappe-bench]$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (5.0.0)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/develop
HEAD is now at b4c063e96 fix(syntax): rollup config
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/develop
HEAD is now at ecac822613 Merge pull request #15393 from codingCoffee/hub
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling keyfetcher
INFO:bench.utils:git fetch --all
Fetching ix-gitrepo
Fetching bitbucket-spec
INFO:bench.utils:git reset --hard bitbucket-spec/master
HEAD is now at c221347 filters doctype
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling salesforce_catcher
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at ea55633 blank json
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling ktp_kayako_ticket_puller
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 1a4d194 add doctype to fixtures
INFO:bench.utils:find . -name “*.pyc” -delete
Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (18.0)
INFO:bench.utils:./env/bin/pip install -q -r /usr/home/latte/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/salesforce_catcher/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/keyfetcher/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/ktp_kayako_ticket_puller/requirements.txt
Updating node packages…
INFO:bench.utils:yarn install
yarn install v1.3.2
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.63s.
Backing up sites…
Patching sites…
Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [======================================= ]Traceback (most recent call last):
File “/usr/local/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/local/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/usr/home/latte/frappe-bench/env/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/commands/site.py”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/migrate.py”, line 41, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose, reset_permissions=reset_permissions)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/sync.py”, line 56, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 65, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 132, in import_doc
doc.insert()
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 249, in insert
self.run_post_save_methods()
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 906, in run_post_save_methods
self.run_method(“on_update”)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 773, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 1049, in composer
return composed(self, method, *args, **kwargs)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 1032, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/model/document.py”, line 767, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 264, in on_update
self.run_module_method(“on_doctype_update”)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 329, in run_module_method
module = load_doctype_module(self.name, self.module)
File “/usr/home/latte/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 187, in load_doctype_module
raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Hub Tracked Item (erpnext.hub_node.doctype.hub_tracked_item.hub_tracked_item Error: No module named doctype.hub_tracked_item.hub_tracked_item)
[latte@erp10-jb ~/frappe-bench]$

It’s with new installations only. I tried an faced the same issue.

Re hub changes see for eg Executing erpnext.patches.v10_0.delete_hub_documents failing - #3 by clarkej

I was in ERPNext 11 beta. Upgraded with following commands.
I was in v11 beta and run the following commands to update.

sudo su bench
cd /opt/bench/erpnext
bench update

image
Version

Received the below error

/opt/bench/erpnext/apps/frappe/frappe/utils/help.py:251: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being                                                                   unequal
  if name not in files \
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
  File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
  File "/opt/bench/erpnext/apps/frappe/frappe/commands/__init__.py", line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/opt/bench/erpnext/apps/frappe/frappe/commands/site.py", line 223, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
  File "/opt/bench/erpnext/apps/frappe/frappe/migrate.py", line 65, in migrate
frappe.utils.help.sync()
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/help.py", line 22, in sync
help_db.build_index()
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/help.py", line 233, in build_index
self.make_index(data[0], data[1], data[2])
  File "/opt/bench/erpnext/apps/frappe/frappe/utils/help.py", line 257, in make_index
fpath = os.path.join(os.path.dirname(original_path), line)
  File "/opt/bench/erpnext/env/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 1: ordinal not in range(128)

I have the same problem :frowning:

/opt/bench/erpnext/apps/frappe/frappe/utils/help.py:251: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

Hey I am having the same problem when executing bench update --patch & bench migrate. This is a fresh installed server.

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/site.py”, line 223, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/opt/bench/erpnext/apps/frappe/frappe/migrate.py”, line 65, in migrate
frappe.utils.help.sync()
File “/opt/bench/erpnext/apps/frappe/frappe/utils/help.py”, line 22, in sync
help_db.build_index()
File “/opt/bench/erpnext/apps/frappe/frappe/utils/help.py”, line 233, in build_index
self.make_index(data[0], data[1], data[2])
File “/opt/bench/erpnext/apps/frappe/frappe/utils/help.py”, line 257, in make_index
fpath = os.path.join(os.path.dirname(original_path), line)
File “/opt/bench/erpnext/env/lib/python2.7/posixpath.py”, line 73, in join
path += ‘/’ + b
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc4 in position 1: ordinal not in range(128)

Hi guys,

The fix deployment is in progress: fix(setup_global_help): allow utf-8 in filename by codingCoffee · Pull Request #6132 · frappe/frappe · GitHub

You’ll need a little bit more patience before being able to update your instances :wink:

2 Likes

Working for me thanks