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

BASH - Summarising information present in 2 genotype data columns in one column (ped file) [closed]
Python 3: How to call function from another file and pass arguments to that function ?
Streaming mp3 files in Django through Nginx
Opening PE file with Bokken
Python exercise: last letter / first letter
Python/Pygame: Can you run a program whilst having a Pygame window that can still update?
Replacing values in array from netCDF
confused about Python list syntax
Object orientated function parameter to alter variables
Batch processing and breaking up an image
How can I connect multiple if statements when using regular expressions?
Using A For Loop to Return Unique Values in a Pandas Dataframe
Scraping a paginated website with fixed url for every page (Python)
How to index a Cartesian product
A numpy.ravel-likely way to deal with list directly [duplicate]
Python: Append a list to another list and Clear the first list

Categories

HOME
laravel-5
jdbc
batch-processing
erlang
dynamics-crm
websphere
itext
jbehave
wxwidgets
youtube-livestreaming-api
automated-tests
checksum
terrain
branch.io
rebol
desktop
iso
flann
automata
arm-template
grub2
google-people
tortoisegit
flexboxgrid
multiplayer
metis
interrupt-handling
pptp
version-numbering
helper
forum
datadog
gpib
jackson-dataformat-csv
ioc-container
swiftcharts
division
recurrence-relation
shibboleth
dql
meta-raspberrypi
magiczoomplus
infusionsoft
ddms
productivity
amd
scalafx
asmx
defold
seamless-immutable
ogre3d
google-maps-ios
volume
teiid
project-template
aescryptoserviceprovider
json-schema-validator
try-finally
soda
emokit
distribute
enyo
sourcegear-vault
futuretask
achartengine
rspec3
lines-of-code
ticket-system
start-job
tilestache
pgagent
named-ranges
qtestlib
ibmsbt
collabnet
argument-passing
magic-numbers
dbsetup
db4o
java.util.date
cdata
goinstant
ruboto
continuous-testing
shim
isolatedstorage
makefile-project
jquery-selectbox
path-manipulation
post-redirect-get
loadui
scala-2.8
configurable
database-diagramming
standardized
usergroups
visual-studio-dbpro

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