Bugs item #2963405, was opened at 2010-03-04 14:02 Message generated for change (Tracker Item Submitted) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2963405...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: addinfourl instance has no attribute 'status'
Initial Comment: % python version.py Pywikipedia [http] trunk/pywikipedia (r7976, 2010/03/04, 05:43:35) Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)]
Connecting to Memory Alpha (MediaWiki v1.15.1)
----- I see that a similar bug was fixed back in Nov/09 (#2893541)
Traceback (most recent call last): File "/Users/alex/MA/pywikipedia/wikipedia.py", line 7701, in async_put page.put(newtext, comment, watchArticle, minorEdit, force) File "/Users/alex/MA/pywikipedia/wikipedia.py", line 1599, in put newPage, self.site().getToken(sysop = sysop), sysop = sysop, botflag=botflag, maxTries=maxTries) File "/Users/alex/MA/pywikipedia/wikipedia.py", line 1631, in _putPage newPage, token, newToken, sysop, captcha, botflag, maxTries) File "/Users/alex/MA/pywikipedia/wikipedia.py", line 2084, in _putPageOld if response.status != 302 and data.strip() != u"": AttributeError: addinfourl instance has no attribute 'status'
The fix for this is as follows:
Index: wikipedia.py =================================================================== --- wikipedia.py (revision 7976) +++ wikipedia.py (working copy) @@ -2081,7 +2081,7 @@ return self._putPageOld(text, comment, watchArticle, minorEdit, newPage, token, newToken, sysop, captcha=solve)
# We are expecting a 302 to the action=view page. I'm not sure why this was removed in r5019 - if response.status != 302 and data.strip() != u"": + if response.code != 302 and data.strip() != u"": # Something went wrong, and we don't know what. Show the # HTML code that hopefully includes some error message. output(u"ERROR: Unexpected response from wiki server.")
----- That solves the issue for you.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2963405...