-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Hi,
I am trying to use setex method, however it fails with following error:
"value is not an integer or out of range"
I am using it as below:
r.setex(sid, ttl.seconds, jsn)
where ttl is a timedelta object
Here is the trace:
▶ Local vars
/Library/Python/2.7/site-packages/redis/client.py in setex
return self.execute_command('SETEX', name, time, value)
...
▶ Local vars
/Library/Python/2.7/site-packages/redis/client.py in execute_command
return self.parse_response(connection, command_name, **options)
...
▶ Local vars
/Library/Python/2.7/site-packages/redis/client.py in parse_response
response = connection.read_response()
...
▶ Local vars
/Library/Python/2.7/site-packages/redis/connection.py in read_response
raise response
...
▼ Local vars
Variable Value
self
<redis.connection.Connection object at 0x10f7050d0>
response
ResponseError('value is not an integer or out of range',)
However the same thing succeeds via it's non-atomic version:
r.set(sid, jsn)
r.expire(sid, ttl.seconds)
what am i doing wrong (if any), or probably there is some bug to be fixed.