Flask fails with “Error: While importing ‘X’, an ImportError was raised”, but does not display the error. How to find the source of the error?

Solution 1
$ python
>>> from my_app_folder import app
$ FLASK_APP='my_app_folder/app' FLASK_ENV=development flask run
Solution 2
    python wsgi.py
    flask run