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

Python Tor server. stem/flask not showing images in tor
Python3 Socket / Selector register more than one event
iPython sent as background process when bash script executed as subprocess
Matplotlib xticks as days
Renaming tuple column name in dataframe
Jupyter Notebook Toggle Scrolling using Magic Command
Multiple linear regressions according to first column in pandas
Passing tensorflow placeholders as function parameters
Python(3.6)-How can I create a demo program that will create an object from the VotingMachine class I have created?
Python and Plotly offline: create (empty) graph and add traces with for-loop
Installing python on Mac not working
Extracting values from a dataframe column with dtype 'o'
Theano tensor type keeps changing and won't let me pass data
append items from shuffled list to a new list
Authenticate and Authorize for appfolder scope access with OneDrive Business Python SDK
Python logging across open source modules

Categories

HOME
paypal
json
sql-server
vue.js
numpy
plsql
dynamics-crm
google-contacts
laravel-5.3
memory-leaks
mapbox-gl-js
csvhelper
codeeffects
console
spring-cloud-contract
jframe
oclint
quartus
tweets
cvs2svn
embedly
dspic
iup
header-files
shopping-cart
hash-collision
fetch-api
vcard
cgal
thinking-sphinx
jackson-dataformat-csv
backup-strategies
swiftcharts
oscommerce
nlb
swagger-editor
parse-android-sdk
knockout-3.0
z3py
estimation
tableau-server
ogre3d
unity3d-editor
qos
shinyjs
pspice
alter
dojox.charting
ng2-material
inotifypropertychanged
clob
squirrel
elastix
mpeg-4
anythingslider
achartengine
vine
team-build
rx-groovy
divide-by-zero
code-first-migrations
c++-actor-framework
rhel5
cg
collabnet
java-collections-api
author
alpha-transparency
bounds
chrome-for-android
pyjade
sim900
real-time-updates
cdata
driver-signing
vmware-server
adomd.net
qss
graph-coloring
prng
sametime
mvs
cadisplaylink
hinstance
hashalgorithm
throttling
serp
testunit
dcpu-16
scalaxb
port-scanning
phpcrawl
querypath
webrat

Resources

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
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App