You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an exception when test with geodist command.
The traceback of this exception is here:
Traceback (most recent call last):
File "/home/diyidan_backstage/api_pre/master/user.py", line 628, in get_user_and_me_distance_for_user_profile
user_and_me_distance = REDIS_CLIENT_GEO.geodist(name=name, place1=current_user_id, place2=check_user_id, unit='m')
File "/usr/lib/python2.7/site-packages/redis/client.py", line 2135, in geodist
return self.execute_command('GEODIST', *pieces)
File "/usr/lib/python2.7/site-packages/redis/client.py", line 668, in execute_command
return self.parse_response(connection, command_name, **options)
File "/usr/lib/python2.7/site-packages/redis/client.py", line 682, in parse_response
return self.response_callbacks[command_name](response, **options)
TypeError: float() argument must be a string or a number
I checked the current implement of GEODIST command in redis-py.
In source file client.py, line 373, I find code:
Then I checked official document of GEODIST. It says:
If one or both the members are missing, the command returns NULL.
I think we can get the bug now: the RESPONSE_CALLBACKS setting for command GEODIST cannot just be float.
And I found test items of command GEODIST in test_commands.py is lack of this situation.
I'll try to fix this bug with a pull request.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I got an exception when test with geodist command.
The traceback of this exception is here:
I checked the current implement of GEODIST command in redis-py.
In source file client.py, line 373, I find code:
Then I checked official document of GEODIST. It says:
I think we can get the bug now: the RESPONSE_CALLBACKS setting for command GEODIST cannot just be float.
And I found test items of command GEODIST in test_commands.py is lack of this situation.
I'll try to fix this bug with a pull request.
The text was updated successfully, but these errors were encountered: