NoAppException: The file/path provided (autoapp) does not appear to exist.
See original GitHub issueI’ve followed the README for this project but flask.cli keeps throwing me this exception when I try to run flask
.
NoAppException: The file/path provided (autoapp) does not appear to exist. Please
verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py
StackOverflow seems to think it’s an issue with exporting FLASK_APP=autoapp.py
vs FLASK_APP=autoapp
. I’ve tried them both in addition to using the absolute path for the above two variations.
Any thoughts how I can fix this?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:12
Top Results From Across the Web
Flask "Error: The file/path provided does not appear to exist ...
This situation occurs when you have an ImportError which is not propagated through to your terminal. Check all of your files for invalid ......
Read more >[Flask] I'm missing something about these Flask cookiecutter ...
NoAppException : The file/path provided (manage) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ......
Read more >Flask Documentation - Read the Docs
By default, Flask does not include a database abstraction layer, form validation or any- thing else where different libraries already exist ...
Read more >Merge pull request #2490 from davidism/cli-review - CogtoSrc
You can instruct Flask to look for the application in a different module by. exporting the ``FLASK_APP`` environment variable. It can be either...
Read more >Command Line Interface — Flask Documentation (2.2.x)
The flask command is installed by Flask, not your application; it must be ... The development server is provided for convenience, but is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello there.
I was struggling with a similar issue as @rsivapr and it had me investigating a while. However, my issue was a bit more sutile:
cookie-cutter
-based Flask repo I’m working on.FLASK_APP=autoapp.py
andFLASK_DEBUG=1
.autoapp.py
file located in the same directory I was within my terminal session.flask run
command.localhost:5000
on my web browser.Then I tried the following: running
python autoapp.py
to check its output. It turns out I got a quite helpful message, that pointed me out to the ultimate error:Finally, I ran
pip freeze
to confirm I did not have therequests
module in the list, neither in therequirements.txt
file.The solution was to add the
requests
module to therequirements.txt
file and runpip install
again within the proper virtualenv.Although the issue in the end could be considered similar to @rsivapr’s, I wonder why the
flask run
command does not yield a more descriptive error message.I hope this Github issue comments, along with this one, help other Flask users when facing a similar error.
This happened to me when I had a circular import.
You can try to debug by opening the console on the Traceback page and running the command
__import__(app_id)
. If there’s an error on the import, you’ll see it there.