Why do I get the error "A valid Flask application was not obtained from..." when I use the flask cli to run my app? Why do I get the error "A valid Flask application was not obtained from..." when I use the flask cli to run my app? flask flask

Why do I get the error "A valid Flask application was not obtained from..." when I use the flask cli to run my app?


My create_app function didn't return an object of class flask.app.Flask but an object of class connexion.apps.flask_app.FlaskApp, because I am using the connexion framework.

In my wsgi.py file, I could simply set:

application = create_app(config)app = application.app

I didn't even have to do export FLASK_APP=package_name.wsgi:app anymore, autodescovery worked if the flask run command was executed in the folder where the wsgi.py file is.