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
AttributeError: 'str' object has no attribute 'decode'. #326
Comments
What version of jwt do you have? Ref: #325 |
Ah yes looks like I was on 2.0.0. I have downgraded to 1.7.1 for now. |
We're working on the fix @aaronn lots of breaking changes happening lately, so I'll nudge David a bit for getting it out sooner. Sorry! |
#327 should come out in the next release (maybe a quick patch release). |
Fixed by #329 |
Closed in release 4.6.0 |
Still having it on 4.6.0. Started a few hours ago, out of the blue. |
4.6.0 Didn't fix all of my issues, but pinning jwt to 1.7.1 did. FWIW: requirements.txt
|
I had a single import of |
@DannyLee12 If you upgraded to 4.6.0 and used PyJWT 2.0, what was your traceback? You might want to check if the problem is the same as @shredding (assuming shredding fixed the error)... |
Downgraded manually from pip install PyJWT==1.7.1 We are using |
That's your problem. You need to upgrade to 4.6.0 for simplejwt @argerick @DannyLee12 . That way, you can use PyJWT 2.0.0. Edit (2020-12-24): SimpleJWT does NOT support PyJWT 2.0.0 but we do support PyJWT 2.0.0a1 and 2.0.0a2 as of SimpleJWT 4.6.0) Sorry I can't merge the changelog. Need to have some someone else review my PR before merging. It should be reflected in #344 |
Alright apologies. I don't understand what changed in PyJWT 2.0.0a1 to 2.0.0, but apparently it broke stuff... again (as noted in master branch). So reopening a different issue (it's a duplicate) to mark for historical purposes. Find it at #346 |
Happening to us too. I updated our requirements.txt (see below)... I can confirm this solution worked for our project.
|
Contributors -- thanks for working on this library! Much needed part of DjangoRestFramework + Django (greatest framework of all time). |
Yeah, it fucked up a lot of things for us in a very bad timing; but that's not at all affect any of my appreciation for your work. It's a great library and I ❤️ your work. |
Long live open source software.
… On Dec 23, 2020, at 12:05 AM, chp ***@***.***> wrote:
Yeah, it fucked up a lot of things for us in a very bad timing; but that's not at all affect any of my appreciation for your work. It's a great library and I ❤️ your work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ref #349 Unless you wrote verify=False, you aren't effected by this change. Simply upgrade to the already existing SimpleJWT 4.6.0 is good enough. Please note: PyJWT 2.0.0 is supported by SimpleJWT 4.6.0. The master branch tests failed because of certain changes in PyJWT.decode (they started copying the payload first then modifying the copied version), but 4.6.0 is not effected by this change. You should be able to upgrade without a problem. |
Hey– I'm trying to get this package integrated and I'm getting something odd here when a jwt is being created. Is anyone else running into this issue? I'm on 4.4.0
AttributeError: 'str' object has no attribute 'decode'.
The text was updated successfully, but these errors were encountered: