Hi when I try running my flask app on python anywhere it keeps bringing up this error:
Traceback (most recent call last):
File "/home/Yaseen/mysite/flask_app.py", line 395, in <module>
app.run(debug=True)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 920, in run
run_simple(t.cast(str, host), port, self, **options)
File "/usr/local/lib/python3.10/site-packages/werkzeug/serving.py", line 1083, in run_simple
run_with_reloader(
File "/usr/local/lib/python3.10/site-packages/werkzeug/_reloader.py", line 444, in run_with_reloader
sys.exit(reloader.restart_with_reloader())
SystemExit: 0
I went to the code segment it was referring to but I don't understand why its pointing to that segment. On my local machine this error does not come up. Any idea of what it is and how to fix it?
Below is the line of code that is referenced in the console?
app.run(debug=True)
EDIT 1:
app = Flask(__name__)
cors = CORS(app)
the above snippet is found at the beginning of the flask file.
# links the required files for the app
if __name__ == "__main__":
app.run(debug=True)
url_for('static', filename='static\js\SignUp.js')
url_for('static', filename='static\js\Login.js')
url_for('static', filename='static\js\menu.js')
url_for('static', filename='static\js\index.js')
url_for('static', filename='static\css\style.css')
url_for('static', filename='static\images\LOGO (2).jpg')
url_for('static', filename='static\images\logoo.jpg')
url_for('static', filename='static\images\Logo2.jpg')
url_for('static', filename='static\images\services.jpg')
url_for('static', filename='static\images\contactUs.jpg')
url_for('static', filename='static\images\instagram.jpg')
url_for('static', filename='static\images\facebook.jpg')
url_for('static', filename='static\images\tiktok.jpg')
url_for('static', filename='static\images\twitter.jpg')
# links the required files for the app
as requested the lines before and I decided to add the lines after the referenced line of code.