1

I ran this code in flask:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
    return "Hello World!"
if __name__ == '__main__':
    app.run(debug=True)

And it says this

C:\shruti_python> python.exe .\hello.py
* Restarting with stat   
 * Debugger is active!   
 * Debugger PIN: 298-971-142   

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

But when I try to access the http url, it give HTTP 404 error. the ip turns to this http://16.169.147.62/ and gives HTTP Error 404. The requested resource is not found.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Shruti
  • 121
  • 1
  • 1
  • 6
  • Have you tried disabling the proxy for 127.0.0.1? – jonrsharpe Sep 28 '17 at 12:44
  • @jonrsharpe: still the same. i added this ip to the do not use proxy server for ip addresses list. still not getting. – Shruti Sep 28 '17 at 12:49
  • 1
    Well something is interfering, I don’t think this is a problem with the code you’ve shown. – jonrsharpe Sep 28 '17 at 12:50
  • You're not exposing the server to an external address and that redirect has dropped the port number, so you're being redirected, but your python code isn't doing that – OneCricketeer Sep 28 '17 at 12:54
  • thank you. yes that was the issue. the port number i was using in proxy address and the defaul one in script. Now it works fine. – Shruti Sep 28 '17 at 18:33

0 Answers0