Python Programming on Win32 wrote: > The problem is running smtplib in a py2exe compiled exe file. When it > tries to establish a socket to the mail server it fails. > > Just wondering someone has encountered this before, and if someone > might be able to point me in the right direction. > > Unhandled exception in thread started by > Traceback (most recent call last): > File "AutomationThread.pyc", line 152, in Run > File "mail.pyc", line 11, in sendMail > File "smtplib.pyc", line 244, in __init__ > File "smtplib.pyc", line 296, in connect > socket.gaierror: (10093, 'getaddrinfo failed')
In case it helps, this is the text for error 10093: """ WSANOTINITIALISED 10093 Successful WSAStartup not yet performed. Either the application has not called WSAStartup or WSAStartup failed. The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times. """ WSAStartup is called by a process which wants to use winsock, the Windows sockets implementation and it's called by Python's socket module at startup. I can't see anything in py2exe's source which should make any difference to socket initialisation so I'm at a loss. TJG -- http://mail.python.org/mailman/listinfo/python-list