Shizhao added a comment.
This error sometimes occurs when using page.save(), sometimes not
Here is the error log of one of my scripts:
ERROR: Logged in as '172.16.7.13' instead of 'Alertlivebot'. Forcing
re-login.
WARNING: No user is logged in on site wikipedia:zh
Logging in to wikipedia:zh as Alertlivebot@alertlive
WARNING: API warning (login): Fetching a token via "action=login" is
deprecated. Use "action=query&meta=tokens&type=login" instead.
WARNING: API warning (main): Subscribe to the mediawiki-api-announce
mailing list at
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
for notice of API deprecations and breaking changes. Use
[[Special:ApiFeatureUsage]] to see usage of deprecated features by your
application.
ERROR: Received incorrect login token. Forcing re-login.
WARNING: API error badtoken: Invalid CSRF token.
Sleeping for 19.8 seconds, 2021-10-15 02:37:31
Page [[User:Alertlivebot/Status]] saved
ERROR: Logged in as '172.16.7.13' instead of 'Alertlivebot'. Forcing
re-login.
WARNING: No user is logged in on site wikipedia:zh
Logging in to wikipedia:zh as Alertlivebot@alertlive
WARNING: API warning (login): Fetching a token via "action=login" is
deprecated. Use "action=query&meta=tokens&type=login" instead.
WARNING: API warning (main): Subscribe to the mediawiki-api-announce
mailing list at
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
for notice of API deprecations and breaking changes. Use
[[Special:ApiFeatureUsage]] to see usage of deprecated features by your
application.
ERROR: Received incorrect login token. Forcing re-login.
WARNING: API error badtoken: Invalid CSRF token.
Sleeping for 19.9 seconds, 2021-10-15 04:42:56
Following jobs do not exist:
alertlive-beta
Page [[User:Alertlivebot/Status]] saved
ERROR: Logged in as '172.16.7.13' instead of 'Alertlivebot'. Forcing
re-login.
WARNING: No user is logged in on site wikipedia:zh
Logging in to wikipedia:zh as Alertlivebot@alertlive
WARNING: API warning (login): Fetching a token via "action=login" is
deprecated. Use "action=query&meta=tokens&type=login" instead.
WARNING: API warning (main): Subscribe to the mediawiki-api-announce
mailing list at
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
for notice of API deprecations and breaking changes. Use
[[Special:ApiFeatureUsage]] to see usage of deprecated features by your
application.
ERROR: Received incorrect login token. Forcing re-login.
WARNING: API error badtoken: Invalid CSRF token.
Sleeping for 9.9 seconds, 2021-10-15 05:58:21
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
Sleeping for 9.6 seconds, 2021-10-15 14:17:44
Page [[User:Alertlivebot/Status]] saved
Page [[User:Alertlivebot/Status]] saved
ERROR: Logged in as '172.16.1.211' instead of 'Alertlivebot'. Forcing
re-login.
WARNING: No user is logged in on site wikipedia:zh
Logging in to wikipedia:zh as Alertlivebot@alertlive
WARNING: API warning (main): Subscribe to the mediawiki-api-announce
mailing list at
<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
for notice of API deprecations and breaking changes. Use
[[Special:ApiFeatureUsage]] to see usage of deprecated features by your
application.
WARNING: API warning (login): Fetching a token via "action=login" is
deprecated. Use "action=query&meta=tokens&type=login" instead.
ERROR: Received incorrect login token. Forcing re-login.
WARNING: API error badtoken: Invalid CSRF token.
Sleeping for 9.9 seconds, 2021-10-15 22:13:08
Page [[User:Alertlivebot/Status]] saved
My script: https://github.com/shizhao/alertlive/blob/main/alertstatus.py, the
relevant code is in line 50-54
TASK DETAIL
https://phabricator.wikimedia.org/T261050
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Shizhao
Cc: Shizhao, SuperHamster, Schlurcher, Count_Count, JJMC89, matej_suchanek,
daniel, eprodromou, Tgr, Dvorapa, Xqt, Aklapper, Reedy, pywikibot-bugs-list,
Multichill, Devnull, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck,
Zkhalido, WDoranWMF, holger.knust, EvanProdromou, Viztor, DannyS712, Wenyi,
Amorymeltzer, Tbscho, MayS, Sethakill, Mdupont, dg711, Agabi10, Altostratus,
Avicennasis, Pchelolo, mys_721tx, Bawolff, jayvdb, Masti, Alchimista, Legoktm
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]