Closed kmejka closed 4 years ago
Hi! Just from a glance at your logs, it seems that in the 1st example you have the Flask app running with debug off and in the 2nd one with debug on. Running the app with debug mode enables the reloader (as seen in https://stackoverflow.com/a/53790400) and that's why we can see:
* Restarting with stat
in 2nd example, as well as other logs that create an impression that app is started twice.
From my perspective, the difference that you're observing is solely the debug mode. What's unclear though is why it's enabled only in the latter run and not in former one. Could it be that you changed the setting in code or enabled it via an environment variable when you ran it with env file?
I'd be happy to help you to get to the bottom of this. This doesn't appear to be an issue with the plugin though so I'd close the issue. Please reopen if you think otherwise.
Hey @ashald I wanted to return to this item, but I can't reproduce it :). Perhaps setting up the project locally another couple of items fixed it. Anyway - thanks for the help :)
Hi, The plugin is awesome, but I'm having issues with a Flask project in PyCharm. Perhaps I'm doing something wrong. Any help appreciated. The issue is not that easy to explain in writing, so please bear with me, I'm trying my best :).
When I have a Run configuration of type 'Flask server' with environment variables, everything works fine. The application starts up like this (replaced every sensitive info with <...>):
If I attach these same variables using an env file, then the application starts up like this:
It's as if the application starts twice! I'm not sure how to debug this, how to analyse how the application starts up. Any advice?