gothinkster / flask-realworld-example-app

Exemplary real world JSON API built with Flask (Python)
https://realworld.io/
MIT License
902 stars 308 forks source link

While importing 'autoapp', an ImportError was raised #51

Open tararelan opened 2 years ago

tararelan commented 2 years ago

Followed the steps given up until flask db init where I got the following error:

While importing 'flask-realworld-example-app.autoapp', an ImportError was raised

image

psychoche commented 2 years ago

To debug it, try to run: python3 autoapp.py

UPDATE: My Python version is 3.9.7 on Ubuntu 21.10. For me it turned out that the problem is in the Flask-JWT-Extended module version. There are some breaking changes in the module from version 4.x. Downgrade to 3.7.0 helped me: pip install Flask-JWT-Extended==3.7.0

baranyeni commented 2 years ago

@psychoche thank you, this was also the problem with my setup. Maybe setting the version in requirements would be better for those who will also face same problem in the future.