Skip to content

Redis.smove does not encode value #9

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

Closed
Bernie opened this issue Feb 5, 2010 · 2 comments
Closed

Redis.smove does not encode value #9

Bernie opened this issue Feb 5, 2010 · 2 comments

Comments

@Bernie
Copy link

Bernie commented Feb 5, 2010

All other operations pass the value through the _encode method to convert ints, floats, and unicode into the proper string object with appropriate charset. smove does not do this, and passes the value (named member) directly into the command. This results in an AttributeError if the member being passed in is not a string type. Further errors may also occur if the type is a unicode with unsupported characters, or is a list/set/dict.

e.g.:
r = redis.Redis()
r.smove('set', 'list', 3)
Traceback (most recent call last):
File "", line 1, in
File "redis.py", line 808, in smove
src, dst, len(member), member
TypeError: object of type 'int' has no len()

@andymccurdy
Copy link
Contributor

This issue has been resolved in the "newapi" branch of redis-py. I plan on merging this branch into master in the next day or two. I'll make an official release at that time.

@andymccurdy
Copy link
Contributor

This issue has been resolved in the 1.34 release of redis-py.

Kakadus pushed a commit to Kakadus/redis-py that referenced this issue Jan 10, 2025
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