List of steps to reproduce (step by step, including full links if applicable):
pwb redirect -simulate -lang:de both
What happens?:
.WARNING: API error toomanyvalues: Too many values supplied for parameter "pageids". The limit is 50. 0 pages read 0 pages written 0 pages skipped Execution time: 5 seconds Script terminated by exception: ERROR: APIError: toomanyvalues: Too many values supplied for parameter "pageids". The limit is 50. [limit: 50; lowlimit: 50; highlimit: 500; help: See https://de.wikipedia.org/w/api.php for API usage. 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.] Traceback (most recent call last): File "C:\pwb\GIT\core\pwb.py", line 494, in <module> main() File "C:\pwb\GIT\core\pwb.py", line 478, in main if not execute(): File "C:\pwb\GIT\core\pwb.py", line 462, in execute run_python_file(filename, script_args, module) File "C:\pwb\GIT\core\pwb.py", line 143, in run_python_file exec(compile(source, filename, 'exec', dont_inherit=True), File ".\scripts\redirect.py", line 733, in <module> main() File ".\scripts\redirect.py", line 729, in main bot.run() File "C:\pwb\GIT\core\pywikibot\bot.py", line 1577, in run for item in self.generator: File "C:\pwb\GIT\core\pywikibot\bot.py", line 1575, in <genexpr> self.generator = (item for item in self.generator) File ".\scripts\redirect.py", line 259, in get_redirects_via_api data = gen.submit() File "C:\pwb\GIT\core\pywikibot\data\api.py", line 1868, in submit raise pywikibot.exceptions.APIError(**result['error']) pywikibot.exceptions.APIError: toomanyvalues: Too many values supplied for parameter "pageids". The limit is 50. [limit: 50; lowlimit: 50; highlimit: 500; help: See https://de.wikipedia.org/w/api.php for API usage. 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.] CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.APIError'> C:\pwb\GIT\core>
What should have happened instead?:
The limit should be determined first for _next_redirect_group method. len(apiQ) >= 500 might be ok for bots but fails here for some others.
https://codesearch.wmcloud.org/pywikibot/?q=len%5C(apiQ%5C)%20%3E%3D%2050&i=nope&files=&excludeFiles=&repos=