ftpilb.FTP.stor...() freeze mystery
anthra.norell at bluewin.ch
Tue Oct 27 11:53:36 CET 2009
I am trying to upload a bunch of web pages to a hosting service. I
have a connected ftplib.FTP object and can upload files manually from an
IDLE command line using the methods storlines () for html files and
storbinary () for the pictures. So far no problem. In order to upload
the whole set of files I wrote a loop that iterates through the file
names and calls either of the stor... () methods as appropriate. The
loop successfully uploads eight of some twenty files and then freezes.
Ctrl-C doesn't unlock the freeze. I have to kill the IDLE window which
raises a confirmation request "are you sure? The program is still
running." Having no alternative I am sure. I open a new IDLE window and
start over. Every retry fails the exact same way.
My upload method with the loop has a preview mode. It goes through
all the motions including opening and closing my source files but skips
the stor... () methods and in addition displays all commands. The
preview mode completes the iteration sequence and shows nothing unexpected.
What could be the problem? I am totally
fazed and will be most grateful for expert suggestions.
More information about the Python-list