Closed aidar-aminev closed 4 months ago
What happens when you open a python shell and run:
>>> import jwt
import jwt
>>> jwt.__version__
jwt.__version__
'2.8.0'
>>> jwt.PyJWTError
jwt.PyJWTError
<class 'jwt.exceptions.PyJWTError'>
I encountered a similar issue where I received the error module 'jwt' has no attribute 'PyJWTError'
. After investigating, I found that the problem was due to having the jwt
package installed instead of pyjwt
.
Django Allauth requires the pyjwt
package. To resolve this, I removed the jwt
package and installed pyjwt
:
pip uninstall jwt
pip install pyjwt
After making this change, the issue was resolved, and Django Allauth worked as expected.
module 'jwt' has no attribute 'PyJWTError'