You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's what happens when I try to use 'get' on a key that I've used to store a list:
>>> from redis_cache import get_redis_connection
>>> client = get_redis_connection('persistent')
>>> client.rpush('foo', 1)
1L
>>> client.get('foo')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/noah/envs/adioso/lib/python2.6/site-packages/redis/client.py", line 551, in get
return self.execute_command('GET', name)
File "/home/noah/envs/adioso/lib/python2.6/site-packages/redis/client.py", line 361, in execute_command
return self.parse_response(connection, command_name, **options)
File "/home/noah/envs/adioso/lib/python2.6/site-packages/redis/client.py", line 371, in parse_response
response = connection.read_response()
File "/home/noah/envs/adioso/lib/python2.6/site-packages/redis/connection.py", line 311, in read_response
raise response
ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value
Here's what happens when I try to use 'get' on a key that I've used to store a list:
Using fakeredis, I don't get any error:
I think the fix to this might involve tracking the type of item at each key, which could get involved. Is this of interest to fakeredis?
The text was updated successfully, but these errors were encountered: