Bugs item #1999239, was opened at 2008-06-21 02:32 Message generated for change (Comment added) made by wikipedian You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1999239...
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: 9 Private: No Submitted By: Daniel Herding (wikipedian) Assigned to: Nobody/Anonymous (nobody) Summary: Blocking bot account doesn't stop the bot run
Initial Comment: There is a very serious bug in the current version. If someone blocks your bot account, the bot just keeps on running. It prints this message:
WARNING: Your account on wikipedia:de is blocked. Editing using this account will stop the run.
But then it doesn't stop. Instead, it will try to save the page, fail, and happily continue using the sysop account. Sooner or later, someone will also block your sysop account for a few minutes. PyWikipedia then shows this warning:
WARNING: Your sysop account on wikipedia:de is blocked. Editing using this account will stop the run.
Again, it will happily continue, of course failing on each page. After a few minutes, the block will run out, and the bot will continue to make changes.
As far as I can tell, the problem is this: In _getEditPage(), there is this code, which would be responsible for stopping the bot:
if self.site().isBlocked(): raise UserBlocked(self.site(), self.aslink(forceInterwiki = True))
But it looks like _getEditPage() isn't even called, so this check doesn't even happen.
I don't know who is responsible for this, but this is a real pain in the ass, and it needs to be fixed ASAP.
---- Pywikipedia [svn+ssh] wikipedian@trunk/pywikipedia (r5595, Jun 20 2008, 18:30:58) Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date: 2008-06-21 11:48
Message: Logged In: YES user_id=880694 Originator: YES
Thanks for the prompt reaction.
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss) Date: 2008-06-21 11:29
Message: Logged In: YES user_id=1327030 Originator: NO
Fixed in r5602 by adding block checks for each action.
----------------------------------------------------------------------
Comment By: NicDumZ Nicolas Dumazet (nicdumz) Date: 2008-06-21 08:59
Message: Logged In: YES user_id=1963242 Originator: NO
Yes, I had suffered the same bug in november (no sysop account was involved, though), and even with the commit access, I forgot to fix it :(
Now, every action (move, delete, edit, and so on), call _getActionUser, which itself calls isAllowed. What about raising an error here if(self._isBlocked[index]) ?
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian) Date: 2008-06-21 02:42
Message: Logged In: YES user_id=880694 Originator: YES
Please note that Nicolas Dumazet already written about this on the mailing list on 2007-11-12: "[Pywikipedia-l] Shouldn't bots stop trying to edit when blocked ??!"
I don't know if he already suffered from the same bug that I described, but if he did, then it's a real shame that it hasn't been fixed for more than a half year.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian) Date: 2008-06-21 02:38
Message: Logged In: YES user_id=880694 Originator: YES
I have now committed a workaround for this bug; it raises a UserBlocked exception already in _getUserData(), not only in _getEditPage(). This is not a nice solution, but we cannot tolerate bots which ignore being blocked.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1999239...
pywikipedia-l@lists.wikimedia.org