ftplib connection fails with multiple nics

Sean DiZazzo half.italian at gmail.com
Tue Oct 20 14:20:01 EDT 2009


On Oct 19, 10:23 pm, Tim Roberts <t... at probo.com> wrote:
> Sean DiZazzo <half.ital... at gmail.com> wrote:
>
> >I'm trying to connect to an ftp site from a windows machine with two
> >nics going to two different networks, but I keep getting the below
> >exception:
>
> >Traceback (most recent call last):
> >  File "ftp.pyo", line 70, in connect
> >  File "ftp.pyo", line 17, in __init__
> >  File "ftplib.pyo", line 131, in connect
> >  File "socket.pyo", line 498, in create_connection
> >gaierror: [Errno 10093] getaddrinfo failed
>
> >I think it is because of the two nics, because the code runs fine on
> >other machines.  Any ideas on how to fix this?
>
> 10093 is WSANOTINITIALISED, implying that WSAStartup has not been called.
> Are you doing this in a thread?  Are these all the same version of the
> operating system?
> --
> Tim Roberts, t... at probo.com
> Providenza & Boekelheide, Inc.

Yes.  I'm running it a thread.  It's tough to debug because the code
is wrapped up as an exe.  ie. There is no local python install to test
with.

Can you elaborate on what WSANOTINITIALZED actually means?  Where is
it called in the Python code?  Inside socket.py?  Can I force a
WSASTARTUP call in python code?

PS. Im on Windows. Thanks!

~Sean



More information about the Python-list mailing list