Page MenuHomePhabricator

site.search() does not work for wikimania:wikimania
Open, LowPublic

Description

Steps to reproduce

  1. Try pywikibot.Site('wikimania', 'wikimania').search('hello')

Expected behavior
Should work fine.

Current behavior
Fails with the following error:

WARNING: API error toomanyvalues: Too many values supplied for parameter "gsrnamespace". The limit is 50.

If we ask API for namespaces automatically and then try to search wikimania using API:Search, this is not expected.

Event Timeline

Complete traceback:

WARNING: API error toomanyvalues: Too many values supplied for parameter "gsrnamespace". The limit is 50.
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/pavel/pywikibot/pywikibot/data/api.py", line 2823, in __iter__
    self.data = self.request.submit()
  File "/home/pavel/pywikibot/pywikibot/data/api.py", line 2091, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: toomanyvalues: Too many values supplied for parameter "gsrnamespace". The limit is 50.
[limit: 50;
 lowlimit: 50;
 highlimit: 500;
 help: See https://wikimania.wikimedia.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.]

That's because wikimaniawiki has a lot of content namespaces. Immediate solution would be to grant the user bot rights, or API high limit requestor globally. Unsure what to do as the long term solution. Increase the limit?

holger.knust added a subscriber: holger.knust.

We currently don't see any work for the Core Platform Team on this ticket. Retag us if needed.