Skip to content
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

ImportError: cannot import name 'DecodeError' from 'jwt' (ubuntu 18/python 3.8) #456

Closed
foozzi opened this issue Oct 29, 2021 · 2 comments
Closed

Comments

@foozzi
Copy link

foozzi commented Oct 29, 2021

Traceback (most recent call last):
  File "/root/dmndmn-dev/venv/lib/python3.8/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/root/dmndmn-dev/dmndmn/__init__.py", line 20, in <module>
    from flask_jwt_extended import create_access_token
  File "/root/dmndmn-dev/venv/lib/python3.8/site-packages/flask_jwt_extended/__init__.py", line 1, in <module>
    from .jwt_manager import JWTManager
  File "/root/dmndmn-dev/venv/lib/python3.8/site-packages/flask_jwt_extended/jwt_manager.py", line 4, in <module>
    from jwt import DecodeError
ImportError: cannot import name 'DecodeError' from 'jwt' (/root/dmndmn-dev/venv/lib/python3.8/site-packages/jwt/__init__.py
@vimalloc
Copy link
Owner

Sounds like there is a different jwt module that it's trying to import from. Make sure you only have PyJWT installed in your virtualenv (and that it is up to date), and that you don't have a jwt.py file or jwt/ directory in your local path.

@foozzi
Copy link
Author

foozzi commented Oct 30, 2021

Sounds like there is a different jwt module that it's trying to import from. Make sure you only have PyJWT installed in your virtualenv (and that it is up to date), and that you don't have a jwt.py file or jwt/ directory in your local path.

thank you.
i uninstalled module 'jwt' and reinstalled PyJWT and Flask-JWT-Extended

it's work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants