I want to develop Zope apps on my Win95 notebook computer without being connected to the Internet. When I do so, I get the following message:
File "C:\Temp\Paul's Site/lib/python1.5\BaseHTTPServer.py", line 97, in server_bind hostname, hostnames, hostaddrs = socket.gethostbyaddr(host) socket.error: host not found
I got the same problem as you did :( (except I have Win98 and I had this thing where the DUN connection dialog box would come up and ask me if I wanted to connect to the internet -- cancelling it would cause the code to fail!). Here's the good news though: I fixed it (I can't guarantee the reliability of this quick hack, though :(). I modified the BaseHTTPServer.py file by commenting out the offending code (starting from line #97,BaseHTTPServer.py which shows up in the error message) and adding the last line (hostname = host). This is inside the class HTTPServer in the server_bind method : ... #hostname, hostnames, hostaddrs = socket.gethostbyaddr(host) #if '.' not in hostname: # for host in hostnames: # if '.' in host: # hostname = host # break hostname = host ... I think the reason why this fails is because the socket.gethostbyaddr() call tries to bring up some network tcpip and won't work on a stand-alone Wintel system that doesn't have a network device installed (It did'nt matter that I had a hosts.txt file). All the other socket calls work though. I had an old notebook with a PCMCIA network/modem combo card and I never had a problem so I guess it had something to do with Windows detecting a network device on your system. Hope this works... BTW, You can then access this site with http://127.0.0.1:8080 ... _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com