FTP problem

Thomas Philips tkpmep at gmail.com
Fri Jan 14 06:55:10 EST 2011


I'm using ftplib for the first time, and am having trouble getting it
to work. I type
>>> from ftplib import FTP
>>> ftp = FTP('ftp.indexftp.barcap.com', 'A Valid Username', ' A Valid Password')

where I have suppressed the user name and password, and I get
Traceback (most recent call last):
 File "<pyshell#2>", line 1, in <module>
 ftp = FTP('ftp.indexftp.barcap.com')
 File "C:\Python26\lib\ftplib.py", line 116, in __init__
 self.connect(host)
 File "C:\Python26\lib\ftplib.py", line 131, in connect
 self.sock = socket.create_connection((self.host, self.port),
self.timeout)
 File "C:\Python26\lib\socket.py", line 498, in create_connection
 for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno 11001] getaddrinfo failed
I have tried this on two different computers and on two different
versions of Python (2.6 and 2.7). I get the same error both times, and
have no understanding of what the problem might be. Any assistance
would be greatly appreciated.
Sincerely
Thomas Philips


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /