-
Notifications
You must be signed in to change notification settings - Fork 30
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: 'dict' object has no attribute '_jws' #15
Comments
It's a caller bug. |
can anyone shed a light? I've got the same issue.. |
You should first instantiate the import jwt
instance = jwt.JWT()
instance.encode(...) There is also a complete encoding/decoding code example on the README. Refer https://github.com/GehirnInc/python-jwt#examples. |
I have installed this using: And I am using a code:
But I am getting error:
|
@nwoow Please paste full Python traceback |
I am using Django and I have installed it and I am trying to generate a token using code above and the response I am getting:
|
I think that there is a function named
|
@yosida95 I have changed my function name to something different actually in views.py controller name was
|
@nwoow could you provide the output of |
@yosida95 yes I am using getstream client and they are using PyJWT both PyJWT and your jwt both are importing jwt how come. Do you have any solution |
Unfortunately, no. As of now both libraries use the same |
@yosida95 anyway I fixe the problem by uninstalling using :
And then I uninstalled pyJWT using:
And then install it again:
And my code:
Is working |
AttributeError: 'dict' object has no attribute '_jws'
got this error :
while generating token:
token = jwt.JWT.encode({'public_id' : user.public_id, 'exp' : datetime.datetime.utcnow() + datetime.timedelta(minutes=30)}, app.config['SECRET_KEY'])
The text was updated successfully, but these errors were encountered: