[Flask] Cannot run debug mode

mhysnm1964 at gmail.com mhysnm1964 at gmail.com
Sun Sep 15 19:11:14 EDT 2019



Windows 10, Python 3.6.


I am having an issue with my flask app and do not understand why it does not
work. If I use the flask environment variables to set debug mode. I get
error messages where Flask cannot find the script. If I do not set the
environment variables. It runs. 


The files of interest I believe are budget.py, __init__.py and routes.py.
Only file modified is:


---- budget.py ---


from app   import app, db

from app.models import * 



def make_shell_context():

return dict(db = db, Categories = Categories, SubCategories = SubCategories,
Transactions = Transactions, Accounts = Accounts, DescriptionSearch =


If I have the following environments set: 


Set flask_app = budget.py

Set flask_debug = 1


I get the following errors:


WARNING: This is a development server. Do not use it in a production
deployment.                                     Use a production WSGI server

* Debug mode: on  

* Restarting with statc:




If I change the budget.py module import statement too: 


from budget import app, db


and remove the flask_debug environment variable. I do not get the above
errors. Does anyone know why? 


Basically I cannot run flask in debug mode.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190916/57f9f2f0/attachment.html>

More information about the Flask mailing list