Multichill added a comment.
I think this happens: - Bot fires up and gets some tokens - Bot does a lot of edits all with the same token - For some reason after a long time the token is not valid anymore - The bot continues to try to edit with the old invalid token instead of getting a new one How long is a token supposed to be valid? Forever? The Pywikibot code seems to assume that it can use the same token for all edits in a one run. One run can take days or weeks. As a work around I now force the site to get a new token when I run into a problem. That seems to be stable. So I think Pywikibot needs to be updated in the framework itself that if it runs into a token error, the a new token gets retrieved, updated in the token cache and the edit should be retried. Agree @Xqt ? Most relevant code is in https://github.com/wikimedia/pywikibot/blob/master/pywikibot/site/__init__.py btw. TASK DETAIL https://phabricator.wikimedia.org/T261050 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Multichill Cc: matej_suchanek, daniel, Krinkle, eprodromou, Tgr, Dvorapa, Xqt, Aklapper, Reedy, pywikibot-bugs-list, Multichill, JohnsonLee01, SHEKH, Naike, Dijkstra, CBogen, Khutuck, Zkhalido, WDoranWMF, Viztor, DannyS712, Wenyi, Amorymeltzer, Ramsey-WMF, Tbscho, MayS, Sethakill, Mdupont, JJMC89, dg711, Poyekhali, Agabi10, Altostratus, Taiwania_Justo, Avicennasis, Pchelolo, Ixocactus, Wong128hk, mys_721tx, Bawolff, El_Grafo, Dinoguy1000, jayvdb, Anomie, Masti, Alchimista, Steinsplitter, Rxy, Keegan, Legoktm
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs