Debugging a flask app fails

Hey folks,

I am currently trying to get my flask app to debug. It runs through in normal mode however in debug mode (PyCharm, not the flask one) I keep getting the error "No module named flask.flask". So this is my configuration:

I noticed if I uncheck FLASK_DEBUG the error does not show up. Both Windows and macOS same issue.


Win10, PyCharm 2019.1.3, Python 3.6, Flask 1.1.0

macOS 10.14, PyCharm 2019.1.3, Python 3.7, Flask 1.1.1

I am thankful for any advice.

EDIT: I just tried to break down, whether it could be something wrong with my project so I ran this minimal example and I am ending up with the same error.

from flask import Flask

app = Flask(__name__)

def hello_world():
return 'Hello World!'

if __name__ == '__main__':

So at least for me it is a reproducible behavior. 


This is happening to me as well just yesterday. And debugger used to work 100% sure with FLASK_DEBUG = True


Flask in pip updated from 1.0.3 to 1.1.1 yesterday, introducing this error message to my project.

I've simply frozen my requirements.txt to 1.0.3 until the situation improves.


Edit: on closer inspection it seems to have been updating more lately (, so I don't know which particular version bump was the culprit. 1.0.3 works for me still.


@Jarkko That's what I was gonna check next, since I created a new venv by coincidence yesterday as well. Thanks


@Jarkko I also updated recently. As you and Gustavo figured, it used to work for me prior to the update, maybe I should have covered this aspect in my initial post... I chose to postpone the flask update, too.


untick the 'FLASK_DEBUG' solves the issue for me


@Ken Liqi This just disables the FLASK_DEBUG mode but does not solve the problem.


Please sign in to leave a comment.