[Pywikipedia-l] [ pywikipediabot-Bugs-1966402 ] catlib.py is not catching PageNotSaved

SourceForge.net noreply at sourceforge.net
Sun May 18 11:53:26 UTC 2008


Bugs item #1966402, was opened at 2008-05-18 12:18
Message generated for change (Comment added) made by nicdumz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1966402&group_id=93107

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: General
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nightshadow28 (nightshadow28)
>Assigned to: NicDumZ — Nicolas Dumazet (nicdumz)
>Summary: catlib.py is not catching PageNotSaved

Initial Comment:
Category.py aborts at full-protection page.

[[w:ja:中田譲治]] is under full-protection, but if category.py tries to edit the article, bot will abort with following massage:

Changing page [[ja:中田譲治]]
ERROR: Unexpected response from wiki server.
       200 (OK)
(HTML)

Dumping to category.dump.bz2, please wait...
Traceback (most recent call last):
  File "category.py", line 945, in ?
    bot.run()
  File "category.py", line 432, in run
    inPlace=self.inPlace)
  File "/home/tatsujin/pywikipedia/catlib.py", line 473, in change_category
    article.put(text, comment)
  File "/home/tatsujin/pywikipedia/wikipedia.py", line 1262, in put
    newPage, self.site().getToken(sysop = sysop), sysop = sysop)
  File "/home/tatsujin/pywikipedia/wikipedia.py", line 1417, in _putPage
    return self._putPage(text, comment, watchArticle, minorEdit, newPage, token=self.site().getToken(sysop = sysop, getagain = True), newToken = True, sysop = sysop)
  File "/home/tatsujin/pywikipedia/wikipedia.py", line 1487, in _putPage
    raise PageNotSaved
wikipedia.PageNotSaved
-----

r5393 and bot account does not have adminship.

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

>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-05-18 13:53

Message:
Logged In: YES 
user_id=1963242
Originator: NO

Thanks for your report :)

I believe the fact that the page was fully protected was a coincidence
here: I tried, in a python console, putting that same ja: Page, (with the
intern _putPage method) and I got a LockedPage Error, instead of a
PageNotSaved, which seems to indicate that the lock detection mechanism
*is* properly working here.

However, catlib.py::change_category was not catching all the PageNotSaved
exceptions and I fixed that in r5396, meaning that such errors are not
supposed to be reported to the end user anymore.

If you still diagnose that some "Saving page ... failed" messages are
always prompted for a particular type of full edit-protected pages, please,
let us know.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1966402&group_id=93107



More information about the Pywikipedia-l mailing list