If I am not mistaken, "flask" Should be "Flask" with uppercase F.
This error is also emitted when there's an error in an imported module. A good way to start debugging such errors is to directly run the file with python (without flask run). Do not forget to call the app function.
Just add the following lines of code if you are using Flask's
App Factory pattern[
^]
if __name__ == "__main__":
create_app().run()
After that run the app: python app.py