[spambayes-bugs] [ spambayes-Bugs-806238 ] urllib2 fails in Outlook new-version chk

SourceForge.net noreply at sourceforge.net
Mon Mar 15 22:49:12 EST 2004


Bugs item #806238, was opened at 2003-09-15 11:14
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=806238&group_id=61702

>Category: Outlook
Group: Source code - CVS
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Tim Peters (tim_one)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 fails in Outlook new-version chk

Initial Comment:
Maybe a Python bug!  Don't know.  Using the addin from 
CVS, and right now on Win98SE.  Python 2.3.  Here's a 
one-liner showing the same problem the addin sees:

>>> import urllib2
>>> urllib2.urlopen
("http://www.spambayes.org/download/Version.cfg")
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\PYTHON23\lib\urllib2.py", line 136, in urlopen
    return _opener.open(url, data)
  File "C:\PYTHON23\lib\urllib2.py", line 333, in open
    &#039;_open&#039;, req)
  File "C:\PYTHON23\lib\urllib2.py", line 313, in _call_chain
    result = func(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 849, in http_open
    return self.do_open(httplib.HTTP, req)
  File "C:\PYTHON23\lib\urllib2.py", line 843, in do_open
    return self.parent.error(&#039;http&#039;, req, fp, code, msg, 
hdrs)
  File "C:\PYTHON23\lib\urllib2.py", line 353, in error
    result = self._call_chain(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 313, in _call_chain
    result = func(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 479, in 
http_error_302
    return self.parent.open(new)
  File "C:\PYTHON23\lib\urllib2.py", line 333, in open
    &#039;_open&#039;, req)
  File "C:\PYTHON23\lib\urllib2.py", line 313, in _call_chain
    result = func(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 849, in http_open
    return self.do_open(httplib.HTTP, req)
  File "C:\PYTHON23\lib\urllib2.py", line 843, in do_open
    return self.parent.error(&#039;http&#039;, req, fp, code, msg, 
hdrs)
  File "C:\PYTHON23\lib\urllib2.py", line 359, in error
    return self._call_chain(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 313, in _call_chain
    result = func(*args)
  File "C:\PYTHON23\lib\urllib2.py", line 419, in 
http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found


Strangely, there&#039;s no problem if I use urllib instead:

>>> import urllib
>>> urllib.urlopen
("http://www.spambayes.org/download/Version.cfg")
<addinfourl at 19178920 whose fp = <socket._fileobject 
object at 0x0124C688>>
>>> _.read()
&#039;# This file is generated from spambayes/Version.py - do 
not edit\n[SpamBayes]\nDate:July 2003\nFull 
Description:%(Description)s, version ...

Etc -- it gets the whole file fine.


----------------------------------------------------------------------

>Comment By: Tony Meyer (anadelonbrin)
Date: 2004-03-16 16:49

Message:
Logged In: YES 
user_id=552329

I'm pretty sure this is working again now, even with the
spambayes.org URL, and the spambayes.sf.net one definately
does, so it doesn't seem that we need to do anything.  From
here (NZ) at least, the spambayes.sf.net one is considerably
faster, although I have no idea why that would be, so that's
probably the better one to use, anyway.

If anyone else thinks that something still needs to be done
here, please reopen!

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2003-09-15 11:47

Message:
Logged In: YES 
user_id=31435

I switched spambayes/Version.py, rev 1.21, to use a 
SourceForge URL for now.  Works for me ...

----------------------------------------------------------------------

Comment By: Adam Walker (xenogeist)
Date: 2003-09-15 11:38

Message:
Logged In: YES 
user_id=583713

When I paste "http://www.spambayes.org/download/Version.cfg"
into my browser the page forwards to
"http://spambayes.sourceforge.net//download/Version.cfg"
which also causes the error with urlib2. however,
"http://spambayes.sourceforge.net/download/Version.cfg" does
not.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=806238&group_id=61702



More information about the Spambayes-bugs mailing list