[Tutor] GET function not executed

Alan Gauld alan.gauld at btinternet.com
Sun Oct 18 10:40:44 EDT 2015


On 18/10/15 06:09, Rahul Pathak wrote:
> Hi,
>
> I started with python web module and i have no experience with web.

OK, web.py is not part of the standard library and I have no
experience with that specific framework. I also see Peter Otten
has picked up an issue about the urls set. But there's something
else that I notice which may be significant...

> But when I execute this code on terminal and put http://localhost:8080/ in
> browser then I get  "not found"  in browser and at terminal I get error -
>
> $ python webse.py
> http://0.0.0.0:8080/
> 127.0.0.1:51204 - - [18/Oct/2015 10:29:46] "HTTP/1.1 GET /" - 404 Not Found

Note the first line of output uses 0.0.0.0:8080 which may suggest
that's what the server is expecting?
But you are accessing localhost which is 127.0.0.1.

The fact that you even get some kind of error message suggests the 
server is somehow detecting the localhost request but maybe its
looking in the wrong place for the GET result?

I don't know the framework and so don't know what the significance of 
the 0.0.0.0 is but it might be relevant so I thought I'd point it out.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list