Startup Tasks: FLASK_APP not set

Answered

I want to start my flask app on Pycharm launch but when I add my script I got :

FLASK_APP not set
FLASK_ENV = development
FLASK_DEBUG = 0

If I launch it manually it work well:

FLASK_APP = run.py
FLASK_ENV = development
FLASK_DEBUG = 0

How can I fix that ?

Thank you

6 comments

Hi Loic,

Please attach a screenshot of your Run/Debug Configuration and the full output of the console.

0

So, as I can see, PyCharm indicates that there is no FLASK_APP environment variable set. Please try specifying this environment variable in your Run/Debug Configuration. (see more info about flask project in PyCharm https://www.jetbrains.com/help/pycharm/creating-flask-project.html).

>If I launch it manually it work well:

Please clarify what you mean by that? Where and how did you run it?

0

> Please clarify what you mean by that? Where and how did you run it?

If I click on the green arrow 

0

Why is it tagged as answered ?

0

>Why is it tagged as answered ?

It doesn't mean that it is solved, no worries.

So, have you tried to set this environment variable?

If doesn't work, please reproduce the problem, then rename and upload your logs folder zipped (Help | Compress Logs and Show in...) to https://uploads.services.jetbrains.com/ and let me know the name of that zip file.

0

Please sign in to leave a comment.