473,396 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with ftplib

hi all,
im trying to create an ftp connection to some ftp site
using the followin code..but i always get an error in this line :

import ftplib
ftp =ftplib.FTP("ftp.cwi.nl")
....
...
this is the error i get..:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "H:\ActivePython\lib\ftplib.py", line 107, in __init__
self.connect(host)
File "H:\ActivePython\lib\ftplib.py", line 117, in connect
for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
socket.gaierror: (11001, 'getaddrinfo failed')


could some1 plz explain wht this means...why m i unable to ccnnect to it or any ftp site for that matter.

all these sites open thru the web browser though...
Also,
i am able to connect to the internal ftp server created in my netwrok..
with the same syntax, just the name of the my interenal ftp..
PLZZ HELP...
Feb 29 '08 #1
1 3425
jlm699
314 100+
That sounds like a DNS problem... which is particularly strange since your webbrowser can connect to that same site.

I tried literally that exact code:
Expand|Select|Wrap|Line Numbers
  1. >>> import ftplib
  2. >>> ftp = ftplib.FTP("ftp.cwi.nl")
  3. >>> ftp.close()
  4. >>> ftp.connect("ftp.cwi.nl")
  5. '220-\n220-***********************************************************************\n220-*                        Welcome to FTP.CWI.NL                        *\n220-***********************************************************************\n220-*                                                                     *\n220-*  Unauthorized access prohibited and forbidden.                      *\n220-*  All actions are logged, by continuing you agree to this policy.    *\n220-*  Violations will be reported to the authorities.                    *\n220-*                                                                     *\n220-***********************************************************************\n220-*                                                                     *\n220-*  Some information to help you use our ftp site:                     *\n220-*  For information on the use of our /incoming directory              *\n220-*  read the incoming.readme file.                                     *\n220-*                                                                     *\n220-*  Information here is placed here by our researchers,                *\n220-*  meaning it can be work related or something private.               *\n220-*                                                                     *\n220-*  In any case, SMC/CWI takes NO responsability about the             *\n220-*  content or effects after use of material placed here.              *\n220-*                                                                     *\n220-*  Contact for technical questions: ftpadmin@cwi.nl                   *\n220-*                                                                     *\n220-***********************************************************************\n220-\n220 '
  6. >>> 
  7.  
Feb 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: python | last post by:
Hi: I want to write a procedure to automatically upload some files for me, but I'm getting stuck. Before I write my own gruesome put() function, I wanted to check if there is an easier way. ...
0
by: Joshua Burvill | last post by:
Hello, I am trying to print something to a print server using the following function but I get errors, does anyone have any pointers? Rgds, Josh Traceback (most recent call last): File...
1
by: ardechou | last post by:
hi , i have to build an application whoi using python 2.3 This application is running on python 2.2 , but i want to change to python 2.3. So , i used in my application ftplib to search a file in...
2
by: Matija Papec | last post by:
I would like to reimplement ftplib "nlst" using ftplib.dir (ftp server doesn't support nlst) so I'm trying to guess how to use ftp callbacks. Any help is appreciated. tia! ============...
1
by: Peter A. Schott | last post by:
I download a lot of 4-6 KB files and regularly run into issues with files that don't get downloaded all the way or otherwise get corrupt. I do something like: RemoteList = nlstdir() for...
2
by: Harlin Seritt | last post by:
Using ftplib from Python I am trying to get all files in a particular directory using ftplib and then send those same files to another ftp server. I have tried using commands like 'get *' and 'mget...
1
by: kristian.hermansen | last post by:
keherman@ibmlnx20:/tmp$ cat helloworld.py #!/usr/bin/env python import pygtk pygtk.require('2.0')
6
by: half.italian | last post by:
Hi all, I'm using ftplib to transfer large files to remote sites. The process seems to work perfectly with small files, but when the file gets to large ~20GB I begin getting errors that...
1
by: Jon Bowlas | last post by:
Hi All, I've written a little method to connect to an ftpserver which works well, however when I send a file using this ftp connection oddly I _sometimes_ get returned an EOFError from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.