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

MattB mattbarkan at gmail.com
Fri Feb 19 19:20:53 EST 2010


On Feb 19, 6:02 pm, "Martin P. Hellwig" <martin.hell... at dcuktec.org>
wrote:
> 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!
>
> --
> mph

Hey all,

I've used httpfox to identify the precise headers being sent by
firefox, and then added them to my program using br.addheaders(), as
per the proper mechanize syntax. No dice. (In fact, these headers were
in the program when I ran it successfully from my friend's computer at
his apartment). So I'm pretty sure it's not a header issue.

I'll check and see whether firefox and my system are using a proxy.

Also, based on Martin's comment, I just wanted to make you all aware
that I intend no misuse, but rather am just trying to learn, as I'm a
programming noob. I am not doing anything that I can't do myself from
firefox (ie, I have an account at the school, and am allowed to sign
on with my name and password and look up information in the student
directory). If I do it for more than one student, it just becomes
repetitive, so I thought this was a first modest goal in learning to
do some programming.)

That said, I'm happy to discontinue the attempts, but I'd like to know
how it is that my computer (unless using firefox) is completely
blocked from opening urls from within python. (And how to fix it).

Thanks for the continued help.



More information about the Python-list mailing list