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

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

Closed
Ileriayo opened this issue Jul 3, 2021 · 3 comments

Comments

@Ileriayo
Copy link

Ileriayo commented Jul 3, 2021

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):

  • OS: MacOS Catalina
@sorXCode
Copy link

sorXCode commented Jul 3, 2021

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
Copy link
Author

Ileriayo commented Jul 3, 2021

Worked fine, thanks Victor!

@Ileriayo Ileriayo closed this as completed Jul 3, 2021
@avara1986
Copy link
Member

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

#235

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

3 participants