trouble with urllib and ftps

R

Russell E. Owen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top