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)]
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.
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.
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]) ?
Logged In: YES
user_id=1327030
Originator: NO
Fixed in r5602 by adding block checks for each action.
Logged In: YES
user_id=880694
Originator: YES
Thanks for the prompt reaction.