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
- Printing all even or odd numbers between a maximum and minimum value using python
- Part 1: Building a User-Friendly Todo App with Flask - A Step-by-Step Guide for Setting up Flask Application template
- Part 6: Building a User-Friendly Todo App with Flask - Step-by-Step Guide to Delete Todo and Category Items via DELETE Requests
- Django project deployment on Railway hosting missing styles and staticfiles
- How to add YouTube plugin to Django CkEditor
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.