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

cannot access excel file using Pandas Python
Python OpenCV: Conversion from float to int for using cv2.line()
Make a Scatter Plot in matplotlib with dates on x axis and values on y
Decoding NumPy int64 binary representation
Groupby DataFram by its rank/percentile
AttributeError: 'str' object has no attribute 'loads', json.loads()
Can anyone explain me the example of an exploit in Python’s pickle module?
Why does pandas multi-index dataframe slicing seem inconsistent?
How to restore a tensorflow network and to use it
Python swampy installation error
How to save a csv file so iPython shell can open and use it?
Combine tuples of tuples if share some elements
Inheritance in Python: What's wrong with my code?
Confusing reference ownership: how to properly deallocate (via Py_DECREF) objects of an object?
Insert element to list based on previous and next elements
Why is str.strip() so much faster than str.strip(' ')?

Categories

HOME
rest
jsviews
facebook-graph-api
boost-thread
cocos2d-x-3.0
ll
rebol
google-plus
dropbear
android-viewpager
facebook-javascript-sdk
jboss-eap-7
cakephp-2.9
wordpress-theming
hashicorp-vault
ctypes
x-frame-options
maxima
pdo
apache-karaf
hhvm
header-files
data-cleansing
jenkins-job-dsl
solidworks
vegan
pari
skygear
fabric-digits
ios-ui-automation
recurrence-relation
lego
active-model-serializers
intellilock
crop
stress-testing
cppunit
ivona
vcf
chown
jenkins-jira-trigger
slot
emoticons
shinyjs
gradle-script-kotlin
typhoon
audioqueue
wcf-ria-services
linkageerror
windows-nt
mercurial-hook
financial
group-concat
sun-codemodel
hateoas
function-fitting
file-diffs
geodjango
hyperthreading
retro-computing
vine
rx-groovy
hiera
sqoop2
ejabberd-saas
chaining
author
emma
ssms-addin
mbox
initialization-vector
ksoap2
opendata
onselect
installshield-2009
entity-framework-4.1
surveyor-gem
fortran77
vertical-scrolling
device-emulation
android-contextmenu
couchdb-lucene
fotoware
scrollto
pstree
legacy-code
parameterization
entity-framework-ctp5
electronic-signature
collect
gethashcode
zend-form-element
open-graph-beta
querypath
aio
plinq
graph-layout
soft-keyboard
system-codedom-compiler
associativity
rd





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android


MS Developer
developer works
python
ios
c
html
jquery


RDBMS discuss