Can't Access ANY url from python (errno 61)

Martin P. Hellwig martin.hellwig at
Sat Feb 20 00:02:34 CET 2010

On 02/19/10 21:48, MattB wrote:
> Hey all,
> I've been working on a program that accesses my school's password
> protected website and downloads directory names. I'm using mechanize.
> Recently, the program has been unable to open the website, returning
> the 'errno 61 connection refused' error. I presume the school's server
> was blocking me because of many automated logins.

Being a former school BOFH, I can assure you that if I was annoyed by 
your 'misuse' I would have tracked you down and made you aware of it.

> However, it turns out that I cannot now open ANY url from within
> Python on my computer using mechanize (or urllib for that matter).
> And I've tried in several places -- my place, a friend's place (who
> also has comcast as an ISP) and the school -- but no dice, constant
> errno 61's whenever I try to open a url.

As mentioned by Jonathan Gardener, this is most likely a proxy gateway.

> The strangest thing about this is that firefox still works flawlessly
> on any site.

Your system might have been centrally configure so that applications are 
aware of the proxy, firefox probably has been piggybacking on those 
settings (as it should). Most platforms can be made aware of a proxy by 
a DHCP option send by the DHCP server (that is when you automatically 
get an IP address).

> Any suggestions would be greatly appreciated.
> Matt

Google a bit around how you can figure out (from inside your script) 
whether your used platform has a proxy configured and how to use it with 
your application.

Good luck!


More information about the Python-list mailing list