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

Lie Ryan lie.1296 at gmail.com
Sat Feb 20 02:02:41 EST 2010


On 02/20/10 13:32, MattB wrote:
> 
> I'm using the network in my own apartment. Not the campus's.
> Moreover, my mac's MAC address is different from the MAC address shown
> by my router, but as I said I'm also blocked when using my friend's
> wireless router at his apartment.
> 
> So it must be my mac's MAC, and not the router's MAC, that's being
> blocked, right?
> 
> But ALSO -- is it my ISP that's blocking the mac's MAC (and not the
> school), since I can't raise ANY url's from python when I'm on
> wireless?

MAC or IP blocking can't be the reason, as the OP stated, he can use
Firefox just fine.

Can you access, say, http://www.google.com from urllib or mechanize?

If you can't access *any website* using urllib/mechanize but you can
with a browser and you're on a unix-based machine, you probably have the
same problem as I used to have. Check whether you used the same hostname
in /etc/conf.d/hostname and /etc/hosts (or wherever your distro saves
its hostname configurations, I use Gentoo); after editing those files
reboot (there are ways to avoid reboot, but rebooting guarantees the
conf file is reread).

Check the hostname by running this python script:

import socket
hn = socket.gethostname()
print hn
print socket.gethostbyname(hn) # should be 127.0.0.1



More information about the Python-list mailing list