Hello,<br><br>I get this error:<br><br><div style="margin-left: 40px;">Traceback (most recent call last):<br> File "./map_taxo.py", line 186, in ?<br> Download_me(ftp,ftp_dir,file,target)<br> File "./map_taxo.py", line 95, in Download_me<br>
host=ftputil.FTPHost(ftp,user,password)<br> File "/usr/lib/python2.4/site-packages/ftputil/ftputil.py", line 136, in __init__<br> self._session = self._make_session()<br> File "/usr/lib/python2.4/site-packages/ftputil/ftputil.py", line 174, in _make_session<br>
return ftp_error._try_with_oserror(factory, *args, **kwargs)<br> File "/usr/lib/python2.4/site-packages/ftputil/ftp_error.py", line 86, in _try_with_oserror<br> raise PermanentError(obj)<br>ftputil.ftp_error.PermanentError: 530 Sorry, the maximum number clients (32) from your host are already connected.<br>
Debugging info: ftputil 2.2.3, Python 2.4.3 (linux2)<br></div><br>I have a list of file s to be downloaded and open/close for every items. Is it the correct way of doing it?<br><br><div style="margin-left: 40px;">def Download_me(ftp,ftp_dir,file,target):<br>
user = 'anonymous'<br> password = 'anonymous'<br> try:<br> print "CONNECTING TO "+ ftp + ftp_dir+file+"\n"<br> host=ftputil.FTPHost(ftp,user,password)<br> host.chdir(ftp_dir+file)<br>
names=host.listdir(host.curdir)<br> for name in names:<br> if host.path.isfile(name):<br> p="pep"<br> m_pep=re.search(p,name)<br> if m_pep:<br> returned=name<br> host.download_if_newer(name,target,'b')<br>
host.close()<br> except:<br> print "could not be dowloaded try KAAS"<br> ftp='<a href="http://ftp.genome.jp">ftp.genome.jp</a>'<br> ftp_dir='/pub/kegg/genes/organisms_kaas/'<br> print "CONNECTING TO "+ ftp + ftp_dir+file+"\n"<br>
host=ftputil.FTPHost(ftp,user,password)<br> host.chdir(ftp_dir+file)<br> names=host.listdir(host.curdir)<br> for name in names:<br> if host.path.isfile(name):<br> p="pep"<br> m_pep=re.search(p,name)<br>
if m_pep:<br> returned=name<br> host.download_if_newer(name,target,'b')<br> host.close()<br></div><br>Thanks for your help.<br><br>yvan<br>