title: Unable to view flask app -- network error 404 on localhost
body: <p>I see this issue posted alot...but no solutions thus far have worked for me (sorry about the repost).</p>
  <p><strong>PROBLEM</strong>
  I'm trying to run flask on my windows10 machine, and am unable to load a simple hello.py without a 404 error.</p>
  <p><strong>DEBUGGER</strong>
  The debugger is working for syntax errors (I can see the lines from hello.py file in my browser if I break the syntax in the file...but I'm getting no help on the 404 if the py file doesn't contain errors. The terminal also detects changes to the file it's supposed to load on the screen.</p>
  <p>(I take it this means that the venv is set up properly, and the issue lies in the network handlers on windows..)</p>
  <p><strong>Things I've done</strong>
  I've tried.</p>
  <ol>
  <li>Disabling all the firewalls</li>
  <li>Restarting the machine (countless times)</li>
  <li>netstat -aon to confirm my ports are being used by another service.</li>
  <li>Uninstalling and reinstalling python</li>
  <li>Setting up new venvs on different drives on my machine</li>
  <li>allowing all permissions in windows for all users and guests prior to creating the virtual environment.</li>
  <li>installing xampp and setting up ports for apache =&gt; flask run --port:PORT</li>
  <li>Uninstalling xampp</li>
  <li>sitting and crying in the corner of the shower with water running on my face</li>
  </ol>
  <p><strong>Code for hello.py</strong></p>
  <p>'''</p>
  <pre><code>from flask import Flask
  from werkzeug.debug import DebuggedApplication
  
  app = Flask(__name__)
  
  app.route('/')
  def index():
      return '&lt;h1&gt;hello world&lt;/h1&gt;'
  
  
  
  if __name__ =='__main__':
      app.run(host='localhost', port=5000, debug=True)
  </code></pre>
  <p>'''</p>
  <p><strong>File Tree</strong></p>
  <pre><code>_pycache_
  Include
  Lib
  Scripts
  hello.py
  pip-selfcheck.json
  pyvenv.cfg
  </code></pre>