Reputation: 27
I just recently came to know abt the module flask for creating website using python and After learning abt it i just made a project of my own. Initially while i tried running this project everything was good i was able to access the local application created in the localhost:5000 by the flask module, but recently when i tried running the same project i wasn't able to access localost:5000. I didn't change anything in the code and i tried re-running the code and restarting chrome multiple times but still i wasn't able to fix the problem. It would be really helpful if y'all say a good fix to the above mentioned problem. Thanks in Advance
Upvotes: 0
Views: 32
Reputation: 19
I can recommend some points that usually work for me while reviving some old flask projects.
I usually run Flask applications with pipenv
. Check if you have been using it. If it was on pipenv, Pipfile
and Pipfile.lock
files must be present. In that case, jump to the virtual environment and try running the application there.
Check whether local variables like FLASK_APP
and FLASK_ENV
are set or whether they conflict with the running of the application.
Check for updates and if the code is compatible with the version of Flask.
Try checking for other services running on the localhost:5000. If it is, try running the Flask application on some other port.
Check for internal conflicts with the Flask application. This may happen due to outdated dependencies.
Lastly, try updating the system and modules. Check for any outdated third-party modules used in the application and try updating them.
It would have been more helpful if you would have provided the error. These are some general debugging that I hope will get your application running.
Upvotes: 0