magnusmanske / petscan_rs

The repo for the PetScan tool
https://petscan.wmflabs.org/
GNU General Public License v3.0
43 stars 10 forks source link

petscan often gives no result #144

Closed xqt closed 6 months ago

xqt commented 7 months ago

Pywikibot rund petscan tests on test-wiki which loads pages from one category. This worked fine for 7 years but newadays the tests fails and petscan often gives "No result for source categories" back. The results can can change from one minute to the other [1][2]. See also phab task T352482 [3]

[1] https://integration.wikimedia.org/ci/job/pywikibot-core-tox-deeptest-py36-docker/2901/console [2] https://integration.wikimedia.org/ci/job/pywikibot-core-tox-deeptest-py39-docker/1014/console [3] https://phabricator.wikimedia.org/T352482

strainu commented 7 months ago

See also https://github.com/magnusmanske/petscan_rs/issues/106

JotaCartas commented 7 months ago

The same append to me - an Intermittent "No result for source categories" and inclusion of "®exp_filter" on an random field

fee1-dead commented 6 months ago

This has happened to me a lot of times, pretty annoying, with also ®exp_filter occuring

magnusmanske commented 6 months ago

I have replaced 'regexp_filter' with 'rxp_filter', which should prevent the issue. 'regexp_filter' is still supported for backwards compatibility.

xqt commented 6 months ago

I have replaced 'regexp_filter' with 'rxp_filter', which should prevent the issue. 'regexp_filter' is still supported for backwards compatibility.

This issue still exists:

https://integration.wikimedia.org/ci/job/pywikibot-core-tox-deeptest-py37-docker/82/console
12:53:20 ======================================================================
12:53:20 ERROR: test_petscan (tests.pagegenerators_tests.PetScanPageGeneratorTestCase)
12:53:20 Test PetScanPageGenerator.
12:53:20 ----------------------------------------------------------------------
12:53:20 Traceback (most recent call last):
12:53:20   File "/src/tests/pagegenerators_tests.py", line 384, in test_petscan
12:53:20     site=site)
12:53:20   File "/src/tests/aspects.py", line 239, in assertPageTitlesEqual
12:53:20     gen_titles = self._get_gen_titles(gen, len(titles), site)
12:53:20   File "/src/tests/aspects.py", line 174, in _get_gen_titles
12:53:20     return [page.title() for page in self._get_gen_pages(gen, count, site)]
12:53:20   File "/src/tests/aspects.py", line 156, in _get_gen_pages
12:53:20     gen_pages = list(gen)
12:53:20   File "/usr/lib/python3.7/_collections_abc.py", line 317, in __next__
12:53:20     return self.send(None)
12:53:20   File "/src/pywikibot/tools/collections.py", line 279, in send
12:53:20     return next(self._started_gen)
12:53:20   File "/src/pywikibot/pagegenerators/_generators.py", line 1230, in generator
12:53:20     for raw_page in self.query():
12:53:20   File "/src/pywikibot/pagegenerators/_generators.py", line 1218, in query
12:53:20     raise APIError('Petscan', data['error'], **self.opts)
12:53:20 pywikibot.exceptions.APIError: Petscan: No result for source categories
12:53:20 [language: test;
12:53:20  project: wikipedia;
12:53:20  combination: subset;
12:53:20  categories: Pywikibot Protect Test;
12:53:20  format: json;
12:53:20  doit: ]