From: Jimmy R. <ji...@re...> - 2005-10-08 07:50:33
|
> > Rob Campbell wrote: > >> I have been having trouble with httplib. After looking into it I have > >> noticed that anything using socket.getaddrinfo() has the same problem. > >> The error I am getting is "socket.gaierror: (10093, 'getaddrinfo > >> failed')". I get this error only when using a py2exe generated > >> executable. When I run the same code through the python interpreter, > > it > >> works fine. Am I missing a DLL or anything else that might be causing > >> this problem? Thank you. > > > > The attached isolated test of socket.getaddrinfo works for me when built > > with py2exe 0.6.3. I tried it with both Python 2.3.5 and 2.4.1, both > > under XP SP2. Does this little test work for you? If not, are any of > > your versions different? If it does work for you, then try reducing your > > code more and more to see how simple of an example you can get to fail. > > A batch file that builds the executable and then runs it can save a lot > > of time in repeated attempts at this. > > > > Jimmy > > >=20 > I was able to reproduce it with just 2 lines of code. Importing socket > and making a call to socket.getaddrinfo(). I was able to find the problem > though. Something in the dist directory must have been messed up. I > tried deleting everything in there and then the code started working. I > am running the newest py2exe 0.6.3, does py2exe sometimes have problems > with the dist directory being corrupted? >=20 > Rob Campbell I have seen problems before that were fixed by removing the build and dist directories. I haven't seen the problem repeat so I haven't looked into it. Jimmy |