FTP problem

T

Thomas Philips

I'm using ftplib for the first time, and am having trouble getting it
to work. I type

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
 
P

python

Thomas,
ftp = FTP('ftp.indexftp.barcap.com', 'A Valid Username', ' A Valid Password')

Your FTP URI is bad. When I try to connect to your site from the Windows
FTP client, I get the following response:

Unknown host ftp.indexftp.barcap.com.

Malcolm
 
D

Dennis Lee Bieber

I'm using ftplib for the first time, and am having trouble getting it
to work. I type

C:\Documents and Settings\Dennis Lee Bieber>tracert
ftp.indexftp.barcap.com
Unable to resolve target system name ftp.indexftp.barcap.com.

Stuff in a valid host name and it should work
 
J

Justin Ezequiel

'indexftp.barcap.com' only (sans the 'ftp.' prefix) allows me to
connect to an FTP server
ftp indexftp.barcap.com
Connected to usftp.barcap.com.
220-Connected to usftp.barcap.com.
220 FTP server ready.
User (usftp.barcap.com:(none)):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top