ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

[Release] Instructions for updating to/staying on v10/v11

release

#26

sorry I overlooked the first * in the fetch = +refs ... line


#27

What is the official advice how to do backup of the whole ERPNext before upgrading it?


#28

@generare This is the official way to do it:

bench --site [your site name] backup

#29

Added instructions for removal of frappe_io and foundation apps:


#30

Got this error when updating my testing instance on ESXi/Ubuntu 16.04.

Updating node packages...
INFO:bench.utils:yarn install
yarn install v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "rollup-plugin-vue > @vue/component-compiler@3.4.4" has unmet peer dependency "postcss@>=6.0".
[4/4] Building fresh packages...
Done in 18.41s.
Reloading bench...
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 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, 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 85, in _update
    reload(bench.utils)
UnboundLocalError: local variable 'reload' referenced before assignment
frappe@ene-test:~/frappe-bench$

Started bench update again and after second pass everything seems to be finished and OK


#31

This was detected and fixed immediately. So it ran successfully when re-run.


#32

Thanks… so if I try it now, it will be successful on the first run?


#33

Yes, I think so. Please report if that’s not the case.


#34

OK, I will try it once again. System will be consistent even after two-pass-update?


#35

Yeah, shouldn’t be an issue


#36

Just got the same error, when tried to update on ESXi/Centos7. Tried also on VirtualBox/Ubuntu18.04 and got also the same error.


#37

And works fine on re-running?
EDIT: Sorry, had fixed another issue with same error message. Thanks for reporting.


#38

Okey, I’ll give it another try, have snapshots before update


#39

On ESXi/Centos7 the first pass still ends with the same error, but during second pass got this

Success: Done in 0.047s
Executing frappe.patches.v11_0.rename_standard_reply_to_email_template in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/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 97, in <module>
    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/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/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 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 227, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 38, 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 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/patches/v11_0/rename_standard_reply_to_email_template.py", line 7, in execute
    rename_doc('DocType', 'Standard Reply', 'Email Template')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/rename_doc.py", line 52, in rename_doc
    update_user_settings(old, new, link_fields)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/rename_doc.py", line 96, in update_user_settings
    sync_user_settings()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/utils/user_settings.py", line 50, in sync_user_settings
    for key, data in iteritems(frappe.cache().hgetall('_user_settings')):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 153, in hgetall
    iteritems(super(RedisWrapper, self).hgetall(self.make_key(name)))}
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 1967, in hgetall
    return self.execute_command('HGETALL', name)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/client.py", line 673, in execute_command
    connection.send_command(*args)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 610, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 585, in send_packed_command
    self.connect()
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py", line 489, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:13000. Connection refused.
[frappe@localhost frappe-bench]$

#40

that’s because bench has not been started.


#41

Thanks, this issue has been fixed. Tested on my end.
See commit here.


#42

Okey, I will try it once again and let you know


#43

Confirming that update now works without errors, thanks!
The issue was related only to python2?


#44

Trying to fix for Python3 broke it for Python2.


#45

So better to use python3 from v11?