Try ERPNext Buy Support Partners Foundation

WRONGTYPE Operation against a key holding the wrong kind of value

Hi,

I got bellow error when trying to update to 12.1.7.

Anyone face similar issue?

Patching sites…
Migrating site1.local
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/johnny/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/johnny/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/johnny/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/johnny/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/johnny/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/johnny/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/johnny/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/johnny/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/johnny/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/johnny/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/johnny/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/johnny/frappe-bench/apps/frappe/frappe/migrate.py”, line 40, in migrate
clear_global_cache()
File “/home/johnny/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 48, in clear_global_cache
clear_website_cache()
File “/home/johnny/frappe-bench/apps/frappe/frappe/website/render.py”, line 295, in clear_cache
frappe.clear_cache(“Guest”)
File “/home/johnny/frappe-bench/apps/frappe/frappe/init.py”, line 563, in clear_cache
frappe.cache_manager.clear_user_cache(user)
File “/home/johnny/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 31, in clear_user_cache
clear_notifications(user)
File “/home/johnny/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 120, in clear_notifications
config = get_notification_config()
File “/home/johnny/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/johnny/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 172, in hget
value = super(RedisWrapper, self).hget(_name, key)
File “/home/johnny/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/johnny/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/johnny/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 680, in parse_response
response = connection.read_response()
File “/home/johnny/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

Me too.

The solution offered here worked in my case: Error while update ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value

1 Like

Resolved after a computer restart, and bench update.
I think the problem showed up because I haven’t restarted computer after Ubuntu 16.04 updated.

1 Like

Resolved after server reboot also. I’m using Debian 9.

Problem resolved by following command

redis-cli -p 13000 FLUSHALL

bench update

4 Likes

It is the solution . Thank you!

1 Like

Had the same issue on Debian 9 when running

$ bench update
(...)
WRONGTYPE Operation against a key holding the wrong kind of value

The issue seems to originate from a problem with Redis cache. Maybe a restart of only Redis would be sufficient. In any case, a full server reboot made the problem go away. Thanks!

1 Like

This was helpful!