Re: a bug in urllib?

From: Haim Ashkenazi (haim_at_babysnakes.org)
Date: 07/05/04


Date: Mon, 05 Jul 2004 02:25:29 +0300
To: python-list@python.org

On Sun, 04 Jul 2004 08:38:56 -0700, GMTaglia wrote:

> Haim Ashkenazi <haim@babysnakes.org> wrote in message news:<mailman.387.1088880858.27577.python-list@python.org>...
>> Hi
>>
>> I'm writing a script that uses urllib on win98. until now I used python
>> 2.3.x (x < 4) and it worked ok. I re-installed windows and installed
>> python 2.3.4 and now I get an error when trying to open a url "no host
>> given":
>>
>> Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32
>>
>> Type "copyright", "credits" or "license()" for more information.
>>
>>
>>
>> ****************************************************************
>>
>> Personal firewall software may warn about the connection IDLE
>>
>> makes to its subprocess using this computer's internal loopback
>>
>> interface. This connection is not visible on any external
>>
>> interface and no data is sent to or received from the Internet.
>>
>> ****************************************************************
>>
>>
>>
>> IDLE 1.0.3
>>
>> >>> import urllib
>>
>> >>> f = urllib.URLopener()
>>
>> >>> x = f.open('http://www.python.org')
>>
>>
>>
>> Traceback (most recent call last):
>>
>> File "<pyshell#2>", line 1, in -toplevel-
>>
>> x = f.open('http://www.python.org')
>>
>> File "C:\PYTHON23\Lib\urllib.py", line 181, in open
>>
>> return getattr(self, name)(url)
>>
>> File "C:\PYTHON23\Lib\urllib.py", line 281, in open_http
>>
>> if not host: raise IOError, ('http error', 'no host given')
>>
>> IOError: [Errno http error] no host given
>>
>> >>>
>>
>> --------------------------------------------
>>
>> I don't think it's a network error because I can browse to this site
>> without a problem. does anyone have any idea? is it a bug? can anyone tell
>> me where I can download an earlier version (not activestate, it's not
>> running well on my win98)?
>>
>> Bye
>
> I've just tried also in windows but no errors, same version as you
>
> Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>
>
>>>> import urllib
>>>> f = urllib.URLopener()
>>>> x = f.open('http://www.python.org')
>>>>
>
> Maybe you can reconsider a network error?
no, it's not a network error (unless it's one of those weird windows
settings. my network works fine. it's some kind of regular expression
problem. when it parses the url it leaves the 'host' variable empty for
some reason. I tried several versions and it's the same. the thing is, it
worked under the same version of windows under 'vmware'. I solved it by
upgrading Internet Explorer. maybe some file was corrupted during the
windows installation (I just thank god I don't have to actually work on
windows...).

thanx

-- 
Haim


Relevant Pages

  • Re: a bug in urllib?
    ... > I'm writing a script that uses urllib on win98. ... > Personal firewall software may warn about the connection IDLE ... > interface and no data is sent to or received from the Internet. ... Maybe you can reconsider a network error? ...
    (comp.lang.python)
  • Re: I want to migrate to Linux
    ... especially with Win98 which will run in a small amount. ... So Linux will supply drivers so WIN98 ... You will then do an install just as you would if ... The Windows desktop is displayed in a VMWare console ...
    (comp.os.linux.hardware)
  • Re: Linux? Maybe next time
    ... USB was rather 'bolted on' to Win98 while WinNT/2K ... Installed the drivers and everything went just fine ... And, with Linux, I can fiddle with drivers ... Yes, Windows is easier for many non-technical people; ...
    (alt.os.linux.suse)
  • Re: Alternatives
    ... that one can recommend to a non-techy person, ... WU deactivated, with Windows Media Player deleted, ... empty TEMP files because there are about a half ... as fast as Win98 and handles a load much better. ...
    (microsoft.public.vb.general.discussion)
  • Re: Humax 9200t crashing / locking up
    ... Win98 was a and had ... 2000 and XP which are based on Windows NT) which is rock solid. ... 'reset' button on the device's remote control. ...
    (uk.tech.digital-tv)