Skip to content Skip to sidebar Skip to footer

Redis - Error: Value Is Not A Valid Float

I have a sorted set in Redis. I am trying to update the counter value of a specific element by using zincrby in Python code like: conn.zincrby('usersSet', float(1), 'user1') But i

Solution 1:

Parameters order are differ between redis-cli and python connector. You have to write conn.zincrby("usersSet", "user1", 1)

UPDATE

The python redis library was updated to match redis-cli's order of arguments.

Hence, conn.zincrby("usersSet", 1, "user1") will be the correct usage now.

Post a Comment for "Redis - Error: Value Is Not A Valid Float"