Replies: 1 comment 2 replies
-
I vaguely recall that on Windows it's sometimes possible to run the server without stopping a previous instance, and you won't get an "address in use" error you'll just keep getting the old instance. Check that only one instance of the dev server is running. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A handful of my students are encountering an issue whereby they are developing a flask app locally, and when they make some new changes to the code and restart the local web server, it doesn't show the updated changes, but rather what appears to be an older state of the web app code.
I have confirmed they are saving the files properly and restarting the web app, and their code looks identical to mine and other students whose apps are working locally. The weird thing is the same code and usage command works for me and many of my students, but not for a few of them.
To replicate the bug, we are using the following application factory function in the "web_app/__init__.py" file, and running the app with
FLASK_APP=web_app flask run
command:We tried using the configuration variable
app.config["TEMPLATES_AUTO_RELOAD"] = True
in the application factory function, but it has no effect.We also tried removing / commenting out the code in the main conditional at the bottom of the "web_app/__init__.py" file, upgrading Flask version to 2.2.1, and using the new flask run command
flask --app web_app --debug run
. But that shows the same behavior as before.Please advise on what structure and configuration variables we should be using to fix this issue. Thanks!
Environment:
Update:
I don't think this issue is related to a previous version of the web server still running, because we don't see any issues related to the address being in use.
Beta Was this translation helpful? Give feedback.
All reactions