XZise added a comment.
Okay interesting. It seems to be T61678: Implement badtoken detection and recovery https://phabricator.wikimedia.org/T61678. The last two log entries were very helpful even though a bit confusing, but the actual error is:
Error saving page [[Al'-Dzhazira]] (badtoken: Invalid token) ***
Traceback (most recent call last): File "/data/project/rubinbot2/core/pywikibot/page.py", line 1047, in _save watch=watchval, bot=botflag, **kwargs) File "/data/project/rubinbot2/core/pywikibot/site.py", line 1057, in callee return fn(self, *args, **kwargs) File "/data/project/rubinbot2/core/pywikibot/site.py", line 4140, in editpage result = req.submit() File "/data/project/rubinbot2/core/pywikibot/data/api.py", line 1698, in submit raise APIError(code, info, **result["error"]) APIError: badtoken: Invalid token
If you could open `scripts/reflinks.py` and add the 3rd line of the following snippet (line 520):
editedpages = 0 for page in self.generator: page.site.tokens._tokens.clear() try: # Load the page's text from the wiki
That is the work around I was talking about and clears the token cache. In that case it shouldn't suddenly stop working and if it works then for you I think there should be really a fix for https://phabricator.wikimedia.org/T61678 happening soon.
TASK DETAIL https://phabricator.wikimedia.org/T94688
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, Aklapper, Rubin16, pywikipedia-bugs