[ftputil] 421 Login Timeout (25 seconds)

Christopher Arndt chris.arndt at web.de
Tue Jul 12 16:14:00 CEST 2005


geon schrieb:
> Very sorry, I made in between some changes to solve this problem. That
> is why my error message didnt folllow the code. Anyway it was in that 
> x= host.upload_if_newer(myFile, myFileFTP,'b'). I swear that I got that
> error message, sometimes. But now I am not able to made the Login
> Timeout  any more....

Maybe you just exceeded the quota on your ftp server?

> But now I face another one, if I can ..... 
> Now I got this error (plus some commands from prompt):
> 
> 
> ----> kapka/vz2004_soubory/image048.gif
> ----> kapka/vz2004_soubory/image049.gif
> ----> kapka/vz2004_soubory/image050.gif
> 
> kapka/zpravodaje

What is this line? Is that the output from the following command in your
script?

print '\n',pathRelFTP

> Traceback (most recent call last):
>  File "i:\Python\edu\ftp\ftputil_pokus_english.py", line 32, in ?
>    host.mkdir(pathRelFTP)
>  File "C:\prg\python24\Lib\site-packages\ftputil\ftputil.py", line 550,
> in mkdir
>    ftp_error._try_with_oserror(self._session.mkd, path)
>  File "C:\prg\python24\Lib\site-packages\ftputil\ftp_error.py", line 80,
> in _try_with_oserror
>    raise PermanentError(obj)
> ftputil.ftp_error.PermanentError: 550 kapka/zpravodaje: File exists
>>>> myFileFTP

'myFileFTP' will have still the value from the previous run of the for loop!

> 'kapka/vz2004_soubory/image050.gif'
>>>> host
> <ftputil.ftputil.FTPHost instance at 0x009258F0>
>>>> host.listdir('.')
> []
>>>>
> 
> The last line is very strange ....

Note that your listing the current working directory. In your script
thats the directory the server put you in on connecting. You did not
change it anywhere in your script. What do you expect there to be?

> I made a special site now, not to have to change name and password:
> site: amos.wz.cz, user: amos.wz.cz, pswrd: glass.
> There you can find also the script.

Your script seems ok apart from the following line that looks suspect:

    pathRelFTP=ftpName(dirNameFTP+root.replace(dirName,''))

This will only work as long dirName does not end with r'\'

You should porbably enter more debuuging print statements. Try adding

    print myFile, myFileFTP

after line 37.


More information about the ftputil mailing list