-
Notifications
You must be signed in to change notification settings - Fork 44
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
Breaking changes in Redis-Py 3+ #61
Comments
YuriHeupa
added a commit
to YuriHeupa/leaderboard-python
that referenced
this issue
Mar 14, 2019
Change ZADD calls to supply keys and values as a dict instead of positional arguments. Update tests to provide member data as string instead of dict, since redis-py 3+ only accepts data as bytes, strings or numbers. Fixes agoragames#61
I sent a PR #62 that adds support for redis-py 3+, it's pending review, but for those who need to use this lib with redis-py 3+ immediately, here's a workaround:
This command installs the changes from my fork I used to create the PR, which supports the newest version of redis-py. |
YuriHeupa
added a commit
to YuriHeupa/leaderboard-python
that referenced
this issue
Jan 12, 2021
Change ZADD calls to supply keys and values as a dict instead of positional arguments. Update tests to provide member data as string instead of dict, since redis-py 3+ only accepts data as bytes, strings or numbers. Fixes agoragames#61
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you install the latest version of Redis Python Client (3.1.0 at this time) you will receive this error when trying to run the sample code and use the rank_member function for the first time:
AttributeError: 'str' object has no attribute 'items'
This is because of breaking changes that occurred between Redis Client v2.x to v3.x
https://github.com/andymccurdy/redis-py#upgrading-from-redis-py-2x-to-30
This specific issue can be solved as follows, but I'm not sure if other parts may have broken:
https://stackoverflow.com/questions/53553009/not-able-to-insert-data-using-zaddsorted-set-in-redis-using-python
As a super quick fix, you can use redis python client v2.10.6
To install that version of redis run the following:
pip install redis==2.10.6
The text was updated successfully, but these errors were encountered: