urllib.urlretrieve("http://free.bsdshell.net/")

Oleg Broytmann phd at phd.pp.ru
Tue Jan 23 05:29:54 EST 2001


Hello!

   Strange problem with urllib: urlretrieve("http://free.bsdshell.net/")
always reports "Connection refused". Always:

Traceback (innermost last):
  File "./url-test.py", line 8, in ?
    f, h = urlretrieve(sys.argv[1])
  File "/usr/local/lib/python1.5/urllib.py", line 66, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook)
  File "/usr/local/lib/python1.5/urllib.py", line 184, in retrieve
    fp = self.open(url)
  File "/usr/local/lib/python1.5/urllib.py", line 157, in open
    return getattr(self, name)(url)
  File "/usr/local/lib/python1.5/urllib.py", line 253, in open_http
    h = httplib.HTTP(host)
  File "/usr/local/lib/python1.5/httplib.py", line 51, in __init__
    if host: self.connect(host, port)
  File "/usr/local/lib/python1.5/httplib.py", line 79, in connect
    self.sock.connect(host, port)
IOError: [Errno socket error] (111, 'Connection refused')

   But I always can connect to the site using any WWW browser. What could
be wrong? (Both python 1.5.2 and 2.0 have the problem...)

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list