Hello,

On 6 August 2011 18:55, Dr. Trigon <dr.trigon@surfeu.ch> wrote:
2011/08/06 04:45:45:: !!! Permissions: [[u'move', u'autoreview',
u'move-rootuserpages', u'createtalk', u'minoredit', u'movestable',
u'skipcaptcha', u'nominornewtalk', u'noratelimit', u'*',
u'collectionsaveasuserpage', u'abusefilter-view',
u'abusefilter-log-detail', u'createpage', u'writeapi', u'createaccount',
u'centralauth-merge', u'read', u'autopatrol', u'abusefilter-log',
u'suppressredirect', u'user', u'collectionsaveascommunitypage',
u'reupload-own', u'apihighlimits', u'autoconfirmed', u'edit',
u'sendemail', u'bot', u'upload', u'purge', u'reupload'], None]
2011/08/06 04:45:45:: Email sent.

and here the second run:

2011/08/06 18:28:37:: !!! Permissions: [['user', 'bot', 'autoconfirmed',
'read', 'createaccount', 'edit', 'upload', 'createpage', 'createtalk',
'move', 'upload', 'apihighlimits'], None]

First of all, sorry for the slow response. I haven't had time to look into this (and I still haven't). From the top of my head, the following (hoping someone else will be able to further assist):
I *think* the list " [['user', 'bot', 'autoconfirmed','read', 'createaccount', 'edit', 'upload', 'createpage', 'createtalk','move', 'upload', 'apihighlimits'], None] " is somewhere in the bot code (wikipedia.py:5691 and further) to take as 'default' when no response (or a bogus response) is returned from the server. If not, the server might *actually* be responding with that data, in which case the server is at fault.

If it *is* the default list, I think this should be fixed. It does not make much sense to me to apply a selective default list if no response is returned -- either retry or assume we can do anything. Then again, the latter means the bot would crash when trying to lock without lock rights.

In essence: this needs some thought.

For your problem: try calling Site.getToken(getagain=True) when you get the exception, and retry. (this calls self._load(force=True) and throug there _getUserDataOld(force=True). It's hackish, but the best I can come up with for the moment.

Best,
Merlijn