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 subscribed.

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

MPhamWMF subscribed.

Closing out low/est priority tasks over 6 months old with no activity within last 6 months in order to clean out the backlog of tickets we will not be addressing in the near term. Please feel free to reopen if you think a ticket is important, but bare in mind that given current priorities and resourcing, it is unlikely for the Search team to pick up these tasks for the indefinite future. We hope that the requested changes have either been addressed by or made irrelevant by work the team has done or is doing -- e.g. upgrading Elasticsearch to a newer version will solve various ES-related problems -- or will be subsumed by future work in a more generalized way.