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
- Django project deployment on Railway hosting missing styles and staticfiles
- How to host media files on Cloudinary for Django projects
- Django deployment on railway hosting error: gunicorn command not found
- Hosting PostgreSQL database on Supabase for free
- Filter a foreignkey field based on logged in user in Django Admin Dashboard
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.