flask error: flask.cli.NoAppException: Could not import "app name".
I get the error below whenever I attempt to run my flask app.
flask error: flask.cli.NoAppException: Could not import "app name".
The app name and development mode are been exported from an env file.
Admin
2022-08-09
This error occurs when you have your enviroment variables .env file located in a different directory from your app.py file and python-dotnev is installed.
To fix you have 2 options
- Ether you move your .env file to the same firectory as your app.py file or
- Move your app.py file to the same diretory as your env file.
Similar Content
- How to setup and use Cockroachdb in Django projects
- Migrating your PostgreSQL database from one hosting platform to another (e.g Heroku to Supabase)
- Django urls.py error on migration
- How to setup environment variables for Django projects
- Error: Invalid src prop (https://res.cloudinary.com) on next/image
Privacy Policy
By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.