python-microservices / pyms

Library of utils to create REST Python Microservices
https://python-microservices.github.io/home/
GNU General Public License v3.0
265 stars 45 forks source link

ModuleNotFoundError: No module named 'flask._compat' when trying to run server #234

Closed Ileriayo closed 3 years ago

Ileriayo commented 3 years ago

Describe the bug I get a "ModuleNotFoundError: No module named 'flask._compat'" when I try to run a new pyms app.

To Reproduce Steps to reproduce the behavior: (Simply follow the documentation)

  1. Scaffold a new app with 'pyms startproject' and choose the default options.

    • pyms startproject
  2. Navigate into the new project and install dependencies using virtualenv

    • virtualenv venv
    • source venv/bin/activate
    • pip install -r requirements.txt
  3. Run server

    • python manage.py runserver

Expected behavior The app should not throw any error and be accessible on http://127.0.0.1:5000/[APPLICATION_ROOT]/

Screenshots

Screenshot 2021-07-03 at 15 16 41

Desktop (please complete the following information):

sorXCode commented 3 years ago

Update the requirements.txt to use any Flask version < 2...

E.g add Flask==1.1.4 to the top of the requirements.txt file

Then run pip install -r requirements.txt to install updated dependencies.

Ileriayo commented 3 years ago

Worked fine, thanks Victor!

avara1986 commented 3 years ago

Created a Issue to fix that, thanks @sorXCode @Ileriayo !

https://github.com/python-microservices/pyms/issues/235