Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [23]: k = p.keys()
- In [24]: print k
- ['frontend:test.ufam.jp']
- In [25]: p.type(k.pop())
- Out[25]: 'string'
- In [26]: k = p.keys()
- In [27]: p.lrange(k.pop(),1,1)
- ---------------------------------------------------------------------------
- ResponseError Traceback (most recent call last)
- <ipython-input-27-3130ef3ccf8c> in <module>()
- ----> 1 p.lrange(k.pop(),1,1)
- /usr/local/lib/python2.7/dist-packages/redis/client.pyc in lrange(self, name, start, end)
- 1239 Python slicing notation
- 1240 """
- -> 1241 return self.execute_command('LRANGE', name, start, end)
- 1242
- 1243 def lrem(self, name, count, value):
- /usr/local/lib/python2.7/dist-packages/redis/client.pyc in execute_command(self, *args, **options)
- 571 try:
- 572 connection.send_command(*args)
- --> 573 return self.parse_response(connection, command_name, **options)
- 574 except (ConnectionError, TimeoutError) as e:
- 575 connection.disconnect()
- /usr/local/lib/python2.7/dist-packages/redis/client.pyc in parse_response(self, connection, command_name, **options)
- 583 def parse_response(self, connection, command_name, **options):
- 584 "Parses a response from the Redis server"
- --> 585 response = connection.read_response()
- 586 if command_name in self.response_callbacks:
- 587 return self.response_callbacks[command_name](response, **options)
- /usr/local/lib/python2.7/dist-packages/redis/connection.pyc in read_response(self)
- 580 raise
- 581 if isinstance(response, ResponseError):
- --> 582 raise response
- 583 return response
- 584
- ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value
- In [28]:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement