Bugs item #3601530, was opened at 2013-01-19 22:16 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3601530...
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: category Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Nullzer0 (nu11zer0)
Assigned to: xqt (xqt)
Summary: category.py crashed when there was the category talk page
Initial Comment: I used category.py for moving "Category:a" to "Category:b." In addition, there is the talk page for "Category:a" ("Category talk:a"). Everything worked properly until the script moved "Category talk:a" to "Category talk:b" and left redirect link at the source page, then the script tried to mark for deletion (because my bot didn't have sysop right) in "Category talk:a."
Since mark for deletion uses put() method, and the last edition was done by my bot, LockedPage exception was raised (Not allowed to edit "Category talk:a" because last edit maybe reverted)
In my opinion, line 1982 to 1985 in wikipedia.py (elif self.comment() and username in self.comment(): raise LockedPage(u'Not allowed to edit ...) should be removed. Its condition encounters false positive case too frequently. It also make me have to use force = True in put() method everywhere to escape this error.
Pywikipedia trunk/pywikipedia/ (r10955, 2013/01/19, 20:45:15, ok) Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] config-settings: use_api = True use_api_login = True unicode test: ok
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-01-20 01:42
Message: fixed in r10956
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3601530...
pywikipedia-bugs@lists.wikimedia.org