-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[graphql-python] 'str' object has no attribute 'decode' #1242
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
Comments
Hi, have the same issue here. My Dependencies: graphene = "^2.1.8" Any update? |
I still use the same approach to fix this problem. Try to remove
to be:
the error comes when your object actually have already been encoded, so you don't have to do it twice. |
This comment: flavors/django-graphql-jwt#241 (comment) suggests that you can use PyJWT version 1.7.0: pip install PyJWT==1.7.0 Which would suggest that the getting started guide should be updated to include that: pip install PyJWT==1.7.0 django==2.1.4 graphene-django==2.2.0 django-filter==2.0.0 django-graphql-jwt==0.1.5 https://www.howtographql.com/graphql-python/1-getting-started/ |
I follow this tutorial graphql-python/4-authentication
Dependencies:
Django==2.2.17
django-filter==2.0.0
django-graphql-jwt==0.2.1
graphene==2.1.8
graphene-django==2.2.0
graphql-core==2.3.2
graphql-relay==2.0.1
PyJWT==1.7.1 (I found error: module 'jwt' has no attribute 'ExpiredSignature' when use PyJWT==2.0.0, and fix it after downgraded it)
and getting this error while doing
GraphQL Query:
Error:
I fix this problem by removing
.decode('utf-8')
in the graphql_jwt/utils.py.From:
to be:
My question is, is there any drawbacks or side effects after I do this or is there any better way? Thank you.
The text was updated successfully, but these errors were encountered: