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

How to change background colour in Kivy
Is it correct to use kwargs in the following scenario of python code?
List comprehension with elements appearing twice
How to unread a single char in Python?
Python - pass console command to 3rd party console application
Use select_related for comma separated field
Tensorflow Slim: 'module' object has no attribute 'sum_of_squares'
Trouble trying to test Tensorflow's RNN PTB example
Assert two variables are almost equal in python
PyQt: How to expand all children in a QTreeWidget
How to insert into sqlite faster [duplicate]
How to read and extract and merge multiple huge size csv(1G~)?
how to extract data from json. other answers here did not work for me
How to execute a script or a funciton through python setuptoos?
jinja2 link to static files
multiple checkbox sqlalchemy delete

Categories

HOME
swift
reverse-engineering
firebase-app-indexing
smartphone
qpython3
survival-analysis
zend-framework2
phonegap-cli
console
quill
yocto
iis-7.5
diagram
intellij-plugin
informatica-powercenter
game-physics
ssms-2016
riak-ts
chocolatey
apple-tv
remove-method
go-cd
java-ee-7
skmaps
mayavi
devforce
pari
entity-system
clockwork
salesforce-chatter
ksoap
swagger-editor
mongoexport
active-model-serializers
ddms
pytest-django
ivona
rich-text-editor
floor
chown
web-deployment-project
bnd
execl
unity3d-editor
adler32
createobject
objloader
backstop.js
debugdiag
aescryptoserviceprovider
gherkin
django-south
mfc-feature-pack
group-concat
spservices
coldfusion-7
ninject.web.mvc
response-headers
crash-dumps
isml
epl
word-2013
chaining
hana-xs
tilestache
activity-streams
node-inspector
eclipse-classpath
ember-addon
phpdocx
ifft
db4o
angulartics
windows-mobile-6
.net-cf-3.5
installshield-2011
robospice
swrl
threadx
justgage
mstsc
shortcuts
client-library
reporting-tools
snapjs
domain-calculus
static-variables
associative
ruby-debug
nagle
adobe-contribute
post-redirect-get
chatroom
quick-search

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