redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

ValueError: too many values to unpack in Redis.info()

Open appetito opened this issue 15 years ago • 2 comments

import redis rs = redis.Redis('localhost', 6371) rs.info() Traceback (most recent call last): File "", line 1, in File "build\bdist.win32\egg\redis\client.py", line 519, in info File "build\bdist.win32\egg\redis\client.py", line 339, in execute_command File "build\bdist.win32\egg\redis\client.py", line 324, in _execute_command File "build\bdist.win32\egg\redis\client.py", line 401, in parse_response File "build\bdist.win32\egg\redis\client.py", line 170, in parse_info File "build\bdist.win32\egg\redis\client.py", line 159, in get_value

ValueError: too many values to unpack

function get_value breaks on value ,>=256=25 in redis allocation_stats

i change item.split('=') to item.rsplit('=',1) in client.py line 159 and it works fine

appetito avatar Mar 13 '11 18:03 appetito

This will be fixed shortly (tomorrow). I'll be sprinting on redis-py at PyCon and will get all of these issues updated.

andymccurdy avatar Mar 13 '11 18:03 andymccurdy

This has been resolved using both Redis 2.2.2 server and Redis master (2.3+).

andymccurdy avatar Mar 14 '11 18:03 andymccurdy