-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Issues signing string on Python 3 #89
Comments
Seems like this is fixed in the repo but not on the itsdangerous version in PyPI. Any way we can get a new version or is there a workaround? |
Seems like the TimedSerializer does not suffer from this issue so I suppose that is the workaround. |
I found the log Pretty bad. Go to sleep. |
You need to make sure the string you send to the sign method is a bytes array and you get a byte-array back. Try this: from itsdangerous import Signer
s = Signer('AAAAAAAAAAAAAAAAAAAA')
s.sign('user@user.com'.encode()).decode()
|
@BlackVoid interestingly though, it says "must be str" rather than "must be bytes" ? |
This will be fixed in the next release. |
This code works in Python 2 but doesn't seem to work properly in Python 3. Not a particularly complex example.
The text was updated successfully, but these errors were encountered: