Python FTP timeout value not effective

Chris Angelico rosuav at gmail.com
Mon Sep 2 18:35:33 EDT 2013


On Tue, Sep 3, 2013 at 3:43 AM, John Nagle <nagle at animats.com> wrote:
> "URLError: <urlopen error ftp error: [Errno 10060] A connection attempt
> failed because the connected party did not properly respond after a
> period of time, or established connection failed because connected host
> has failed to respond>"
>
> But in both cases, the command line FTP client will work, after a
> consistent 20 second delay before the login prompt.  So the
> Python timeout parameter isn't working.

That's a socket timeout, not an FTP timeout - that's why the timeout
parameter isn't doing anything. Are you sure it's just a 20-second
delay there? Check if there's something else blocking the connection
somehow. Can you telnet to that computer on port 21?

ChrisA



More information about the Python-list mailing list