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.

message profile
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.

Add Message

Click on the button below to add a new message to this thread

Tags

#python #flask

Thread detail

Satus: Open
Messages: 1Started: 2022-08-09
loading..

DEVMAESTERS

Newsletter

Services

Frontend Development |Backend Development |Full Website Development |Bootstrap Website upgrades | Website Debbugging | Website Hosting & deployment

Contact

Interested in hiring me or collaborating with me on a project, click on any of the links below to get my social media handle

Or contact me via Tel: (+234)-806-225-7480 | Email: abubakarzakari1703@gmail.com

Copywright@devmaesters.com
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.