Upgrade v8 to v9

Dears:

i am trying to upgrade from v8 to v9

i used that command

  • bench update

Then i got error
so i used

  • bech update --reset

now

bench version

erpnext 9.2.2
erpnext_shopify 2.0.15
frappe 9.2.3
razorpay_integration 1.0.0

But the site not open and give me error .

Your system is being updated. Please refresh again after a few moments
Error 503

==========================================================

frappe@erpnext:~/frappe-bench$ bench update
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

Cannot proceed with update: You have local changes in app “erpnext” that are not committed.

Here are your choices:

  1. Merge the erpnext app manually with “git pull” / “git pull --rebase” and fix conflicts.
  2. Temporarily remove your changes with “git stash” or discard them completely
    with “bench update --reset” or for individual repositries “git reset --hard”
  3. If your changes are helpful for others, send in a pull request via GitHub and
    wait for them to be merged in the core.
    frappe@erpnext:~/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
    INFO:bench.app:pulling frappe
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at defcd5b Merge branch ‘hotfix’
    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/master
    HEAD is now at 92e09c0 Merge branch ‘hotfix’
    INFO:bench.utils:find . -name "
    .pyc” -delete
    INFO:bench.app:pulling erpnext_demo
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at 5567d19 Merge pull request #25 from neilLasrado/master
    INFO:bench.utils:find . -name “.pyc" -delete
    INFO:bench.app:pulling erpnext_shopify
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/develop
    HEAD is now at 2aef75d Merge branch ‘develop’
    INFO:bench.utils:find . -name "
    .pyc” -delete
    INFO:bench.app:pulling paypal_integration
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at a2bea27 Update hooks.py
    INFO:bench.utils:find . -name “.pyc" -delete
    INFO:bench.app:pulling razorpay_integration
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at 4669715 Update hooks.py
    INFO:bench.utils:find . -name "
    .pyc” -delete
    INFO:bench.app:pulling poll
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at c8ee00d [website] [cleanup]
    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
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/paypal_integration/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/razorpay_integration/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/erpnext_demo/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/poll/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext_shopify/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“ia32”})
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating erp.fastgrp.net
    Executing execute:frappe.get_single(‘Domain Settings’).save() in erp.fastgrp.net (bb2b73656a0c9d93)
    Traceback (most recent call last):
    File “/usr/lib/python2.7/runpy.py”, line 162, 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
    if not run_single(patchmodule = patch):
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in execute_patch
    exec(patchmodule.split(“execute:”)[1],globals())
    File “”, line 1, in
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 646, in get_single
    return get_doc(doctype, doctype)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 634, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 68, in get_doc
    return controller(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 103, in init
    self.load_from_db()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 126, in load_from_db
    if not getattr(self, "metaclass", False) and self.meta.issingle:
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 62, in meta
    self.meta = frappe.get_meta(self.doctype)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 651, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 33, in get_meta
    lambda: Meta(doctype))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 173, in hget
    value = generator()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 33, in
    lambda: Meta(doctype))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 72, in init
    super(Meta, self).init(“DocType”, doctype)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 103, in init
    self.load_from_db()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 77, in load_from_db
    super(Meta, self).load_from_db()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 140, in load_from_db
    frappe.throw(
    (“{0} {1} not found”).format(
    (self.doctype), self.name), frappe.DoesNotExistError)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
    _raise_exception()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
    raise raise_exception(encode(msg))
    frappe.exceptions.DoesNotExistError: DocType Domain Settings not found
    frappe@erpnext:~/frappe-bench$ bench version
    erpnext 9.2.2
    erpnext_shopify 2.0.15
    frappe 9.2.3
    razorpay_integration 1.0.0
    frappe@erpnext:~/frappe-bench$ B

Thanks for reporting, we will push a fix soon!

1 Like

@sheno Released a fix. Check by running bench update

1 Like

frappe@erpnext:~/frappe-bench$ bench update
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

Cannot proceed with update: You have local changes in app “erpnext” that are not committed.

Here are your choices:

  1. Merge the erpnext app manually with “git pull” / “git pull --rebase” and fix conflicts.
  2. Temporarily remove your changes with “git stash” or discard them completely
    with “bench update --reset” or for individual repositries “git reset --hard”
  3. If your changes are helpful for others, send in a pull request via GitHub and
    wait for them to be merged in the core.
    frappe@erpnext:~/frappe-bench$

frappe@erpnext:~/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
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at fba4743 Merge branch ‘hotfix’
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
remote: Counting objects: 24, done.
remote: Total 24 (delta 18), reused 18 (delta 18), pack-reused 6
Unpacking objects: 100% (24/24), done.
From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
21f946f…6d41a9a develop → upstream/develop
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 92e09c0 Merge branch ‘hotfix’
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling erpnext_demo
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 5567d19 Merge pull request #25 from neilLasrado/master
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling erpnext_shopify
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/develop
HEAD is now at 2aef75d Merge branch ‘develop’
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling paypal_integration
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at a2bea27 Update hooks.py
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling razorpay_integration
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 4669715 Update hooks.py
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling poll
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at c8ee00d [website] [cleanup]
INFO:bench.utils:find . -name “*.pyc” -delete
Updating Python libraries…
INFO:bench.utils:./env/bin/pip install --upgrade pip
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see Advanced Usage - urllib3 2.0.0a2 documentation.
InsecurePlatformWarning
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/paypal_integration/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/razorpay_integration/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/erpnext_demo/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/poll/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext_shopify/requirements.txt
Updating node libraries…
INFO:bench.utils:npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“ia32”})
npm WARN frappe@ No description
Backing up sites…
Patching sites…
Migrating erp.fastgrp.net
Executing execute:frappe.get_single(‘Domain Settings’).save() in erp.fastgrp.net (bb2b73656a0c9d93)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, 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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 217, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in execute_patch
exec(patchmodule.split(“execute:”)[1],globals())
File “”, line 1, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 256, in save
return self.save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 288, in save
self.validate_higher_perm_levels()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 494, in validate_higher_perm_levels
high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 651, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 33, in get_meta
lambda: Meta(doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 173, in hget
value = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 33, in
lambda: Meta(doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 72, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 103, in init
self.load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 77, in load_from_db
super(Meta, self).load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 140, in load_from_db
frappe.throw(
(“{0} {1} not found”).format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.DoesNotExistError: DocType Has Domain not found
frappe@erpnext:~/frappe-bench$

frappe@erpnext:~/frappe-bench$ bench version
erpnext 9.2.2
erpnext_shopify 2.0.15
frappe 9.2.4
razorpay_integration 1.0.0

Your system is being updated. Please refresh again after a few moments

                                                      Status: 503

any guide dears ?

Try run this in a ‘bench console’

frappe.reload_doc(“core”, “doctype”, “has_domain”)

frappe@erpnext:~/frappe-bench$ pwd
/home/frappe/frappe-bench
frappe@erpnext:~/frappe-bench$ frappe.reload_doc(“core”, “doctype”, “has_domain”)
-bash: syntax error near unexpected token `“core”,’
frappe@erpnext:~/frappe-bench$

Like this:

frappe@erpnext:~/frappe-bench$ bench console
Python 2.7.6 (default, Jun 22 2015, 18:00:18)
Type “copyright”, “credits” or “license” for more information.

IPython 5.1.0 – An enhanced Interactive Python.
? → Introduction and overview of IPython’s features.
%quickref → Quick reference.
help → Python’s own help system.
object? → Details about ‘object’, use ‘object??’ for extra details.

In [1]: frappe.reload_doc(“core”, “doctype”, “has_domain”)

In [1]: frappe.reload_doc(“core”, “doctype”, “has_domain”)
File “”, line 1
frappe.reload_doc(“core”, “doctype”, “has_domain”)
^
SyntaxError: invalid syntax

error

error

Your system seems confused - restart it if you can?

I checked github for the fix saurabh6790 refers to in his post #3 but no clues, since your current error is similar, but no joy.

ok i will restart now

actually i restarted but still same problem

i revert my snapshot because i cant upgrade

The problem is the double quotes are not the correct character, try to type them instead of copy and paste.
Or copy and paste this one:

frappe.reload_doc("core", "doctype", "has_domain")
2 Likes

Good catch arielacosta

I was about to suggest single quotes worked in my case (not to confuse with the single ‘back
tick’ character) as I learned just now

In [1]: frappe.reload_doc(‘core’, ‘doctype’, ‘has_domain’, force=True)
Out[1]: True

1 Like