Page MenuHomePhabricator

revertbot.py: WARNING: API error missingparam: The "token" parameter must be set.
Closed, ResolvedPublicBUG REPORT

Description

When I run python pwb.py revertbot -username:HoneymoonAve27 -rollback -num:50 I get this output:

>>> [[sr:Јутарњи шоу (ТВ серија)]] <<<
WARNING: API error missingparam: The "token" parameter must be set.
ERROR: APIError: missingparam: The "token" parameter must be set.
[help: See https://sr.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]
Skipped Јутарњи шоу (ТВ серија)


>>> [[sr:Шифра Деспот]] <<<
WARNING: API error missingparam: The "token" parameter must be set.
ERROR: APIError: missingparam: The "token" parameter must be set.
[help: See https://sr.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]
Skipped Шифра Деспот


>>> [[sr:Шесто чуло (ТВ серија)]] <<<
WARNING: API error missingparam: The "token" parameter must be set.
ERROR: APIError: missingparam: The "token" parameter must be set.
[help: See https://sr.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]
Skipped Шесто чуло (ТВ серија)

and it resumes working and showing it as output until I no stop it with CTRL + C.

Version:

Pywikibot: [ssh] pywikibot-core (8bf917d, g12301, 2020/04/17, 11:44:34, ok)
Release version: 3.1.dev0
requests version: 2.22.0
  cacerts: /etc/ssl/certs/ca-certificates.crt
    certificate test: ok
Python: 3.8.2 (default, Mar 13 2020, 10:14:16) 
[GCC 9.3.0]
PYWIKIBOT_DIR: Not set
PYWIKIBOT_DIR_PWB: 
PYWIKIBOT_NO_USER_CONFIG: Not set
Config base dir: /home/kizule/Desktop/development/pywikibot-core
Usernames for family "wikidata":
        wikidata: Zoranzoki21
Usernames for family "wikisource":
        sr: Zoranzoki21
Usernames for family "wikipedia":
        sr: ZoranBot
Usernames for family "wikiquote":
        sr: Zoranzoki21
Usernames for family "wikibooks":
        sr: Zoranzoki21
Usernames for family "wiktionary":
        sr: Zoranzoki21
        hr: Zoranzoki21
Usernames for family "wikinews":
        sr: Zoranzoki21

Event Timeline

Kizule created this task.Apr 17 2020, 5:10 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptApr 17 2020, 5:10 PM

There is still some issue with token invalidation, sometimes logout tests fail due to missing token as well.

There is still some issue with token invalidation, sometimes logout tests fail due to missing token as well.

When I remove -rollback script works correctly.

Meno25 added a subscriber: Meno25.Nov 10 2020, 12:39 PM

Encountered the same error, this is an updated output with the most recent version

>>> [[arz:نادي تشيلسى]] <<<
WARNING: "rollbacktoken" has been deprecated since MediaWiki 1.24
Sleeping for 5.8 seconds, 2020-11-10 12:33:18
WARNING: API error missingparam: The "token" parameter must be set.
ERROR: APIError: missingparam: The "token" parameter must be set.
[help: See https://arz.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]
Skipped نادي تشيلسى


>>> [[arz:نادي برينتفورد]] <<<
WARNING: "rollbacktoken" has been deprecated since MediaWiki 1.24
Sleeping for 5.8 seconds, 2020-11-10 12:33:24
WARNING: API error missingparam: The "token" parameter must be set.
ERROR: APIError: missingparam: The "token" parameter must be set.
[help: See https://arz.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]
Skipped نادي برينتفورد

Version information:

Pywikibot: [https] r-pywikibot-core (58476d7, g13671, 2020/11/10, 10:31:44, OUTDATED)
Release version: 5.2.0.dev0
requests version: 2.21.0
  cacerts: /etc/ssl/certs/ca-certificates.crt
    certificate test: ok
Python: 3.5.3 (default, Jul  9 2020, 13:00:10)
[GCC 6.3.0 20170516]
Xqt triaged this task as High priority.Nov 10 2020, 1:13 PM
Xqt changed the subtype of this task from "Task" to "Bug Report".

Change 640414 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Take rollbacktoken in revertbot.py

https://gerrit.wikimedia.org/r/640414

Xqt claimed this task.Nov 10 2020, 1:44 PM
Xqt closed this task as Resolved.Nov 10 2020, 3:03 PM

Change 640414 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Take rollbacktoken in revertbot.py

https://gerrit.wikimedia.org/r/640414