Try ERPNext Buy Support Partners Foundation Foundation Members

How to upgrade from ERPNext: v12.1.6 (version-12) Frappe Framework: v12.0.16 (version-12) to ERPNext: v12.1.8 (version-12) Frappe Framework: v12.0.18 (version-12)

How can one do a setup migration from ERPNext: v12.1.6 (version-12) Frappe Framework: v12.0.16 (version-12) to ERPNext: v12.1.8 (version-12) Frappe Framework: v12.0.18 (version-12)

Anyone with the steps on how to do this?

bench update will do it for you

1 Like

@saurabh6790 i just ran bench update and i have this error:

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 “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, 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/co re.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/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/local/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/local/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/local/lib/python2.7/site-packages/click/core.py”, line 555, 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 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 40, in migrate
clear_global_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 48, in clear_global_cache
clear_website_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 295, in clear_cache
frappe.clear_cache(“Guest”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 563, in clear_cache
frappe.cache_manager.clear_user_cache(user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 31, in clear_user_cache
clear_notifications(user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 120, in clear_notifications
config = get_notification_config()
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 198, in get_notification_config
return frappe.cache().hget(“notification_config”, frappe.session.user, _get)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 172, in hget
value = super(RedisWrapper, self).hget(_name, key)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 1963, in hget
return self.execute_command(‘HGET’, name, key)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 668, in execute_command
return self.parse_response(connection, command_name, **options)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 680, in parse_response
response = connection.read_response()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py”, line 629, in read_response
raise response
redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value

How can i solve this? The system is inaccessible now with the following :slight_smile:

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

@saurabh6790 I have managed to update it successfully.For the above error i dont know why it occured.After i got the error this is the steps that i did.Not sure if its whay solved the error:

1 bench setup requirements
2. bench build
3. bench restart
4. i restarted my erpnext server
5. bench update

And it went flawless and finished successfully.What could have caused the error and what resolved the error.Not sure which command there fixed the issue.Thanks for your assistance.

Hi @ben

Tried your approach but seems like my setup is more broken then I thougth.

Any idea what this error means?

[1/4] Resolving packages…
success Already up-to-date.
Done in 0.65s.
Patching sites…
Migrating aptronics
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, 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/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.6/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/python3.6/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/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/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 233, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 48, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 41, in run_all
run_patch(patch)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 30, in run_patch
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 71, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 77, in execute_patch
block_user(True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 127, in block_user
frappe.db.set_global(’__session_status’, block and ‘stop’ or None)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 697, in set_global
self.set_default(key, val, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 711, in set_default
frappe.defaults.set_default(key, val, parent, parenttype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 134, in set_default
add_default(key, value, parent)
File “/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py”, line 147, in add_default
d.insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_method(“before_insert”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1052, in composer
doc_events = frappe.get_doc_hooks()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 895, in get_doc_hooks
hooks = get_hooks(‘doc_events’, {})
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 942, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 79, in get_value
val = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 931, in load_app_hooks
append_hook(hooks, key, getattr(app_hooks, key))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 967, in append_hook
target[key].extend(value)
AttributeError: ‘dict’ object has no attribute ‘extend’
frappe@hemant-VirtualBox:~/frappe-bench$

Any help will be greatly appreciated…

Thanks

kind regards
Hemant

@hpema108 was your initial error exactly like mine?

no, keep getting the same error as shown above, and it does not seem to be similar to what you where getting

@saurabh6790 kindly assist @hpema108 .Am not sure about the error.

Current vm and production server is sitting on

ERPNext: v12.1.6 (version-12)
Frappe Framework: v12.0.16 (version-12)

and cannot update niether enviroment, so not sure what changed and how to fix the error im getting.

Kind regards
Hemant

For what it’s worth, I had exactly the same error and following your solution I was also able to get the update to work. But I just noticed that all my notifications are now gone.