title: flask run Error: Could Not Import "App" and "App.py"
body: <p>Ran into a problem running Flask. Had it working before but something changed.
  I go into my cmd and type flask run, and I get the usual:</p>
  <pre><code>Error: Could not import 'app'.
  </code></pre>
  <p>I googled around and found I could type in the following and it would work:</p>
  <pre><code>Set FLASK_APP=app.py 
  Set FLASK_ENVIRONMENT=development
  flask run
  </code></pre>
  <p>And now instead of saying it cannot import app, now it says it cannot import app.py.</p>
  <p>My file structure is as follows:</p>
  <pre><code>newvenv:
  | Include
  | Lib
  | Scripts
  | | _pyrache_
  | | static
  | | templates
  | | app.py
  </code></pre>
  <p>In the bottom of app.py I have included:</p>
  <pre><code>if __name__ == '__main__':
      app.run(host='0.0.0.0', port=30006, debug=True)
  </code></pre>
  <p>But it doesn't appear to be working.</p>
  <p>I am on windows, and I know flask is finicky on it sometimes, but I don't think that's the cause of it. I'm lost. Any help would be appreciated.</p>