Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zscore throws exception for missing member #15

Closed
rmihael opened this issue Feb 27, 2010 · 2 comments
Closed

zscore throws exception for missing member #15

rmihael opened this issue Feb 27, 2010 · 2 comments

Comments

@rmihael
Copy link

rmihael commented Feb 27, 2010

Redis documentation states that for missing members of zset it returns (nil). It's naturally to expect None on python's side.

Steps to reproduce:
r=Redis()
r.zadd('test', 'foo', 0)
r.zscore('test', 'bar')

@rmihael
Copy link
Author

rmihael commented Feb 27, 2010

Exception trace is:

Traceback (most recent call last):
File "...", line 183, in runTest
self.test(_self.arg)
File "...", line 68, in test_remove_in_concurent_env
score = redis.zscore("test_zset", 5)
File "build/bdist.macosx-10.6-universal/egg/redis/client.py", line 863, in zscore
return self.format_bulk('ZSCORE', name, value)
File "build/bdist.macosx-10.6-universal/egg/redis/client.py", line 294, in format_bulk
return self.execute_command(args[0], cmd, *_options)
File "build/bdist.macosx-10.6-universal/egg/redis/client.py", line 220, in execute_command
return self._execute_command(command_name, command, *_options)
File "build/bdist.macosx-10.6-universal/egg/redis/client.py", line 215, in _execute_command
return self.parse_response(command_name, *_options)
File "build/bdist.macosx-10.6-universal/egg/redis/client.py", line 269, in parse_response
return self.RESPONSE_CALLBACKS[command_name](response, **options)
TypeError: float() argument must be a string or a number

@andymccurdy
Copy link
Contributor

Thanks for the bug report. This issue has been fixed in ab3061a

dbravender pushed a commit to dbravender/redis-py that referenced this issue May 6, 2014
… set that didn't exist.

also made anal cleanup changes removing whitespace before colons!
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants