Closed Suor closed 14 years ago
I can't repeat that behavior:
>>> r = redis.Redis()
>>> r.flushdb()
True
>>> r.smembers('badkey')
set()
Can you provide a failing test case?
Doing the same as you and getting TypeError. redis 1.2.6, python 2.6.2
I think it's redis version, check what your redis is returning in redis-cli. Mine returns (nil)
I am also getting this problem. It would be really good if somewhere in the documentation it was stated what version of the redis client the tests were run against.
The Redis client mimics the version of the server. Meaning the 2.0.X client should work against a 2.0.X server.
I've added a check in cab0380 for None which should fix this bug. See if this fixes your problems. If so, I'll roll a new pypi version.
Awesome, and that is very good to know, but you document that nowhere, it should be among the first things you tell me in the README.md file.
Thanks!
It is in the Readme file... just at the bottom under "Versioning Scheme". You're probably right that it should be at the top. I'll make that change now.
Can you confirm if the latest patch fixed your SMEMBERS issue?
Personally, this problem went away when I got the correct server version.
Well that's what you get for me not reading fully. Ahem. Sorry about that.
Ok, well closing for now. If anyone on an older server version does have issues, please re-open!
Redis server returns nil, then client tries to set() it and fails with "NoneType is not iterable". Should return empty set in this case or at least None. Same for sinter() if any one of keys doesn't exist.