python


flask.cli.NoAppException: The file/path provided (new_app.py) does not appear to exist


I keep getting this error flask.cli.NoAppException: The file/path provided (new_app.py) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py it goes away after I restart the Flask server.
I am running flask run in the correct directory where my app is. This just started happening after working for 2 weeks. I've read that it could be due to an import error, but I am not finding any modules that are not installed on my virutalenv.
from flask import Flask
app = Flask(__name__)
app.debug=True

Most likely you haven't set the FLASK_APP environment variable.
To run the application you can either use the flask command or
python’s -m switch with Flask. Before you can do that you need to tell
your terminal the application to work with by exporting the FLASK_APP
environment variable:
$ export FLASK_APP=hello.py
$ flask run * Running on http://127.0.0.1:5000/
If you are on Windows you need to use set
instead of export.
Alternatively you can use python -m flask:
$ export FLASK_APP=hello.py
$ python -m flask run * Running on http://127.0.0.1:5000/


Related Links

Why are tuples slower than lists at evaluating generators into themselves?
call and control git bash from python script in windows
How get in real time POST update with django and instagram api?
Binary search tree insert method
Log scale mathplotlib in Python?
Why does python come with so many similar, but subtly different functionality for fulfilling certain elementary computing tasks?
How to have adjacent elements reduced to a single element [closed]
adding row to pandas dataframe from series
Python3.4 PIP install error while building
“Settings” for a function in Python
Python zipfile whole path is in file
put style and background color python excel
Storing 2D list from top to bottom vertically into a string
sklearn Kfold acces single fold instead of for loop
Run-time-patch python module
Multi-level parsing pattern to avoid duplicates

Categories

HOME
jdbc
sass
tinyos
nlp
decorator
deep-linking
tomcat7
specflow
defragmentation
tumblr
schemacrawler
pygame
i2c
outlook-web-addins
uiscrollview
webmethods
jacoco
scenebuilder
rhapsody
aptana
vs2017
marathon
epicor
ghost-inspector
facebook4j
nsmenuitem
explode
bcrypt
searchbar
maximo
winscp
configure
vegan
encase
shapes
recurrence-relation
windows-10-iot-core
jquery-cycle2
pace
image-compression
freetts
ntfs-mft
visualstudio.testtools
alchemy.js
soundjs
tango
email-parsing
aqgridview
workflow-foundation-4.5
modelattribute
etherpad
nuget-server
infinite-scroll
redux-router
sqlexception
garrys-mod
inject
coremidi
pydio
spark-cassandra-connector
listadapter
gemini
multinomial
test-class
vips
registrykey
sevenzipsharp
programming-paradigms
jcr-sql2
rhel5
line-numbers
ultrawingrid
sid
io.js
visual-c++-2010-express
circos
dynamic-proxy
sanitization
osx-snow-leopard
goinstant
multiple-login
surveyor-gem
google-closure-library
fortran77
domain-calculus
ubuntu-11.10
vim-powerline
isolatedstorage
file-exists
jpf
jquery-selectbox
file-encodings
iphone-sdk-3.2
lazy-c++
nt4
configurable
msf





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm