title: flask.cli.NoAppException: Failed to find Flask application or factory in module "flaskr". Use "FLASK_APP=flaskr:name to specify one
body: <p>I am building a python web application using flask and following tutorial from <a href="http://flask.pocoo.org/docs/1.0/tutorial/factory/" rel="nofollow noreferrer">http://flask.pocoo.org/docs/1.0/tutorial/factory/</a> . I am running the flask from the parent directory but getting following error. </p>
  
  <pre><code>(venv) E:\python-code\python-web&gt;flask run
   * Serving Flask app "flaskr" (lazy loading)
   * Environment: development
   * Debug mode: on
   * Restarting with stat
   * Debugger is active!
   * Debugger PIN: 294-690-396
   * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  127.0.0.1 - - [16/Mar/2019 13:10:43] "GET /hello HTTP/1.1" 500 -
  Traceback (most recent call last):
    File "e:\python-code\python-web\venv\lib\site-packages\flask\_compat.py", line 35, in reraise
      raise value
    File "e:\python-code\python-web\venv\lib\site-packages\flask\cli.py", line 95, in find_best_app
      module=module.__name__
  flask.cli.NoAppException: Failed to find Flask application or factory in module "flaskr". Use "FLASK_APP=flaskr:name to specify one.
  127.0.0.1 - - [16/Mar/2019 13:10:43] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=style.css HTTP/1.1" 200 -
  127.0.0.1 - - [16/Mar/2019 13:10:43] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=jquery.js HTTP/1.1" 200 -
  127.0.0.1 - - [16/Mar/2019 13:10:43] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js HTTP/1.1" 200 -
  127.0.0.1 - - [16/Mar/2019 13:10:43] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=ubuntu.ttf HTTP/1.1" 200 -
  127.0.0.1 - - [16/Mar/2019 13:10:44] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=console.png HTTP/1.1" 200 -
  127.0.0.1 - - [16/Mar/2019 13:10:44] "GET /hello?__debugger__=yes&amp;cmd=resource&amp;f=console.png HTTP/1.1" 200 -
  </code></pre>
  
  <p>Please help. </p>
  
  <p>I have tried <a href="https://stackoverflow.com/questions/38417060/running-flask-app-from-cli-gives-no-module-named-flaskr">Running Flask app from cli gives &quot;no module named flaskr&quot;</a>
  and 
  <a href="https://stackoverflow.com/questions/52342274/flask-cli-noappexception-failed-to-find-application-in-module">flask.cli.NoAppException: Failed to find application in module?</a></p>