Hello,<br><br>I get this error:<br><br><div style="margin-left: 40px;">Traceback (most recent call last):<br>&nbsp; File &quot;./map_taxo.py&quot;, line 186, in ?<br>&nbsp;&nbsp;&nbsp; Download_me(ftp,ftp_dir,file,target)<br>&nbsp; File &quot;./map_taxo.py&quot;, line 95, in Download_me<br>
&nbsp;&nbsp;&nbsp; host=ftputil.FTPHost(ftp,user,password)<br>&nbsp; File &quot;/usr/lib/python2.4/site-packages/ftputil/ftputil.py&quot;, line 136, in __init__<br>&nbsp;&nbsp;&nbsp; self._session = self._make_session()<br>&nbsp; File &quot;/usr/lib/python2.4/site-packages/ftputil/ftputil.py&quot;, line 174, in _make_session<br>
&nbsp;&nbsp;&nbsp; return ftp_error._try_with_oserror(factory, *args, **kwargs)<br>&nbsp; File &quot;/usr/lib/python2.4/site-packages/ftputil/ftp_error.py&quot;, line 86, in _try_with_oserror<br>&nbsp;&nbsp;&nbsp; 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>
&nbsp; user = &#39;anonymous&#39;<br>&nbsp; password = &#39;anonymous&#39;<br>&nbsp; try:<br>&nbsp;&nbsp;&nbsp; print &quot;CONNECTING TO &quot;+ ftp + ftp_dir+file+&quot;\n&quot;<br>&nbsp;&nbsp;&nbsp; host=ftputil.FTPHost(ftp,user,password)<br>&nbsp;&nbsp;&nbsp; host.chdir(ftp_dir+file)<br>
&nbsp;&nbsp;&nbsp; names=host.listdir(host.curdir)<br>&nbsp;&nbsp;&nbsp; for name in names:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if host.path.isfile(name):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p=&quot;pep&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pep=re.search(p,name)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if m_pep:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returned=name<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host.download_if_newer(name,target,&#39;b&#39;)<br>
&nbsp;&nbsp;&nbsp; host.close()<br>&nbsp; except:<br>&nbsp;&nbsp;&nbsp; print &quot;could not be dowloaded try KAAS&quot;<br>&nbsp;&nbsp;&nbsp; ftp=&#39;<a href="http://ftp.genome.jp">ftp.genome.jp</a>&#39;<br>&nbsp;&nbsp;&nbsp; ftp_dir=&#39;/pub/kegg/genes/organisms_kaas/&#39;<br>&nbsp;&nbsp;&nbsp; print &quot;CONNECTING TO &quot;+ ftp + ftp_dir+file+&quot;\n&quot;<br>
&nbsp;&nbsp;&nbsp; host=ftputil.FTPHost(ftp,user,password)<br>&nbsp;&nbsp;&nbsp; host.chdir(ftp_dir+file)<br>&nbsp;&nbsp;&nbsp; names=host.listdir(host.curdir)<br>&nbsp;&nbsp;&nbsp; for name in names:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if host.path.isfile(name):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p=&quot;pep&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pep=re.search(p,name)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if m_pep:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returned=name<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host.download_if_newer(name,target,&#39;b&#39;)<br>&nbsp;&nbsp;&nbsp; host.close()<br></div><br>Thanks for your help.<br><br>yvan<br>