Newbie question: what is causing my socket error?
mynews44 at yahoo.com
Tue Jun 15 13:59:15 CEST 2004
mynews44 at yahoo.com (google account) wrote in message news:<e84f5d12.0406141922.1e992579 at posting.google.com>...
<snipped problem description>
> The code in the library at line 254 is
> addr = socket.gethostbyname(socket.gethostname())
> which would kinda support my theory about name resolution, but not
> help me resolve the error.
Turns out I was being pretty brickheaded... It wasn't complaining
about not being able to resolve the mail server. It was complaining
about not being able to resolve the host name of the box it was
It is actually mentioned in the sockets documentation somewhere that
this is a requirement.
On my linuxbox, I put an entry for the hostname in the /etc/hosts
file, and then it worked like a bought one.
Thanks for looking! Sorry to trouble you.
Hope this post saves someone some time someday.
More information about the Python-list