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 deployment on railway hosting error: gunicorn command not found
- How to add clipboard functionality to Django CkEditor Code Snippets
- Printing all even or odd numbers between a maximum and minimum value using python
- Error: Invalid src prop (https://res.cloudinary.com) on next/image
- Django: TemplateDoesNotExist (rest_framework/api.html)
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.