[ftputil] problem uploading files to ftp server

Stefan Schwarzer sschwarzer at sschwarzer.net
Tue Jan 30 21:52:46 CET 2007


wcc,

On 2007-01-30 20:22, wccppp wrote:
> Which versions of ftputil and Python do you use?
> 
> ftputil 2.2.1 (the latest) and python 2.5
> Did you actually call the close method of the file-like object?
> If not, does it make a difference? It's common that network data
> is buffered on the client side and some part of it only
> transferred when the file/socket is closed.
> 
> do i need to close? the syntax for upload method is upload(source,
> target, mode) where both source and target is string, not a file
> object.  can I call close method on them?  i tried it and got an
> error.

oops, possibly I shouldn't reply to such emails when I'm ill.
Of course, you don't have to call a close method. Internally,
the upload method uses a target FTPFile which it closes at
the end.

> Can you transfer the files successfully with a command line or
> GUI FTP client from the same client computer?
> 
> yes.  i do it regularly with ftp client (FileZilla). that's why i'm
> trying to automate it with python.

Ok.

> Can you reproduce the problem with another FTP server? (By the
> way, which one on which platform do you use?) How good is the
> network connection between client and server?
> 
> yes. the same problem exists on two ftp servers i tried.  i'm on Windows XP
> Pro. SP2. the internet connection is good.

That's quite interesting.

Could you send me an example file for which the problem actually
occurs? It shouldn't be confidential, of course. ;) I'll try to
reproduce the problem. The file should not be very large, so that
it can be easily mailed, yet large enough to exhibit the problem.

> Btw, I could not forward the message in this mailing list to my email, so I

You mean, you couldn't just "reply"? Your mail client should
have "reply all" (or something similar). Please use that and
edit the headers. In Thunderbird, for example, you can delete
the personal recipient address and change the header type
before the list address to To: instead of Cc: .

> had to start a new thread. I thought I enabled that option when I subscribed
> to this list, guess not. and I don't know how to change it.

I think there is no setting which influences whether you can
send replies. Please try the tip above. Anyway, you can change
your settings at http://codespeak.net/mailman/listinfo/ftputil
if you log in with subscription address and your password at
the bottom of the page.

Stefan


More information about the ftputil mailing list