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

SourceForge.net noreply at sourceforge.net
Sun Sep 14 19:38:16 EDT 2003


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

Category: None
Group: Source code - CVS
Status: Open
Resolution: None
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

    '_open', 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('http', 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

    '_open', 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('http', 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'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()

'# 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: Adam Walker (xenogeist)
Date: 2003-09-14 19: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