-
Notifications
You must be signed in to change notification settings - Fork 47
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
TypeError: String or Integer object expected for key, unicode found #12
Comments
Antoine Bertin (diaoul) wrote: I get it, function_key_generator in dogpile.cache.util returns unicode even though I give my function a pure bytestring. Also, that's not unittested. |
Antoine Bertin (diaoul) wrote: Quick fix:
Not ideal |
Michael Bayer (zzzeek) wrote: yeah this is a dupe of #6. I'm still sticking with "use key_mangler" as the official way to handle this, as that's what it's there for. I don't like adding a big assumption of "unicode" + "happens to be utf-8" + "all backends need it". But I do need to figure out a way to make this very clear because I understand how people are missing this. |
Changes by Michael Bayer (zzzeek):
|
Antoine Bertin (diaoul) wrote: I think you missed it, I passed a bytesting here, not unicode, yet I have an error about unicode. |
Antoine Bertin (diaoul) wrote: There you go:
|
Michael Bayer (zzzeek) wrote: this is something else happening. |
Changes by Michael Bayer (zzzeek):
|
Changes by Michael Bayer (zzzeek):
|
Migrated issue, originally created by Antoine Bertin (diaoul)
Might be the first time I encounter a module able to work with bytestrings but not unicode... This is usually the other way around.
Could you fix this by encoding/decoding with utf-8 by default?
Don't know if this is the same for other backends but not being able to use unicode is a real problem IMO.
The text was updated successfully, but these errors were encountered: