ftplib limitations?

durumdara durumdara at gmail.com
Wed Aug 25 09:43:01 CEST 2010


> So if I understand correctly, the script works well on
> smaller files but not on the large one?

Yes. 500-800 MB is ok.  > 1 GB is not ok.

> > It down all of the file (100%) but the next line never reached.
> _Which_ line is never reached? The `print` statement after
> the `retrbinary` call?

Yes, the print.

> > Some error I got, but this was in yesterday, I don't remember the text
> > of the error.
> Can't you reproduce the error by executing the script once
> more? Can you copy the file to another server and see if the
> problem shows up there, too?

I got everytime, but I don't have another server to test it.

> I can imagine the error message (a full traceback if
> possible) would help to say a bit more about the cause of
> the problem and maybe what to do about it.

This was:

Filename: "Repositories 20100824_101805 (Teljes).zip" Size: 1530296127
..download: 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Traceback (most recent call last):
  File "C:\D\LocalBackup\ftpdown.py", line 31, in <module>
    ftp.retrbinary("retr " + s, CallBack)
  File "C:\Python26\lib\ftplib.py", line 401, in retrbinary
    return self.voidresp()
  File "C:\Python26\lib\ftplib.py", line 223, in voidresp
    resp = self.getresp()
  File "C:\Python26\lib\ftplib.py", line 209, in getresp
    resp = self.getmultiline()
  File "C:\Python26\lib\ftplib.py", line 195, in getmultiline
    line = self.getline()
  File "C:\Python26\lib\ftplib.py", line 182, in getline
    line = self.file.readline()
  File "C:\Python26\lib\socket.py", line 406, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: [Errno 10054] A lÚtez§ kapcsolatot a tßvoli ßllomßs
n bezßrta

So this message is meaning that the remote station forced close the
existing connection.

Now I'm trying with saving the file into temporary file, not hold in


More information about the Python-list mailing list