Réf. : Re: Help for urllib error : 'no host given'

Patrick.Bussi at space.alcatel.fr Patrick.Bussi at space.alcatel.fr
Thu Apr 12 06:13:04 EDT 2001


Hi Steve,

Thank you for your investigation. It helps me understand that my python code is
correct. I did not forget any character, while the name of the url comes from
regex extract of the page returned by the server itself. But you're right on the
fact that the name has something wrong, when used in this way.
I tested the web site "manually", that is pasting the entire name of the web
site directly into my Netscape. Same result : "Netscape can't locate the server.
No host specified" (this message translated from French)

Therefore the question is : how does it come that a Javascript function using
'document.location="http://blablabla"' is able to redirect my browser to the
said web site, and not 'urllib.urlopen("http://blablabla")' ?

More, I do not understand the error message. Does it come from the server which
denies the request *or* from the dns which cannot translate the name into an
address *or* from Netscape which seems not to receive/understand the host name ?

Regards

---
Patrick Bussi
patrick.bussi at space.alcatel.fr


Any opinions expressed are my own and not necessarily those of my Company.






More information about the Python-list mailing list