trouble with urllib and ftps

Russell E. Owen rowen at cesmail.net
Tue Nov 16 19:44:30 EST 2004


I'm finding that urllib reliably fails for me for ftp as follows
(Python bug report 
<http://sourceforge.net/tracker/?func=detail&aid=1067702&group_id=5470&at
id=105470>)

- Start more than 1 transfer, each in its own thread
 - Let those finish
 - Again start more than 1 transfer, each in its own thread
 One of the latter xfers will fail with:
 [Errno ftp error] 200 Type set to A

 Notes:
 - I have seen the problem on more than one ftp server, using 
 different sets of sample files.
 - An explicit ";type=i" suffix on binary file URLs does not help. I 
have not tried text files with explicit "type=a".

A preliminary test with ftplib suggests it does not have this problem. 
Barring better suggestions I'll convert my code (thereby giving up the 
ability to download arbitrary kinds of URLs, but gaining the ability to 
ftp more than one file at a time).

Anyway, I was wondering if anyone else had seen this and could suggest 
some easy workaround. I can't use urllib2 because I need to support 
usernames and passwords for ftp.

Regards,

-- Russell



More information about the Python-list mailing list