Page MenuHomePhabricator

-file and -search does not work together since yesterday
Closed, InvalidPublic

Description

On any script (including my own) these two does not work together since yesterday. I tried many combinations of python pwb.py script -file:"articles_that_need_template.txt" -search:"-insource:/\{\{template/i", but none of them works, every time the script operates on articles even if the template is inside and ignores CirrusSearch's insource at all. It also stopped working on older versions of Pywikibot (where it clearly worked before). It looks like the problem is somewhere in between. CirrusSearch on WIkipedia works as expected too. Maybe some bug/latest change of behavior in MW API? Or some error on MW servers?

Note: I always use the newest code from Gerrit (using git pull --all)
Note: CirrusSearch hastemplate doesn't work too, but it is caused maybe by some other bug (see T155292)

Example. This code should not do anything, because I try on a list of articles to change word kategorie to word whatever, but also I exclude articles containing the word kategorie:

Event Timeline

Dvorapa created this task.Jan 14 2017, 9:08 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 14 2017, 9:08 AM
Dvorapa triaged this task as Unbreak Now! priority.Jan 14 2017, 9:08 AM
Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptJan 14 2017, 9:08 AM
Dvorapa updated the task description. (Show Details)Jan 14 2017, 9:12 AM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)Jan 14 2017, 9:34 AM
Dvorapa updated the task description. (Show Details)
Restricted Application added a project: Discovery. · View Herald TranscriptJan 14 2017, 10:21 AM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)Jan 16 2017, 2:03 PM
Anomie added a subscriber: Anomie.

There does not seem to be anything here for MediaWiki-API. If you identify actual queries to api.php that are not behaving as expected due to errors in the API, rather than vague issues that might be in pywikibot or CirrusSearch, feel free to re-add. As it stands, this report does not identify any API queries at all.

Anomie removed a subscriber: Anomie.Jan 17 2017, 3:42 PM
Dvorapa added a subscriber: Anomie.Jan 17 2017, 4:38 PM

There does not seem to be anything here for MediaWiki-API. If you identify actual queries to api.php that are not behaving as expected due to errors in the API, rather than vague issues that might be in pywikibot or CirrusSearch, feel free to re-add. As it stands, this report does not identify any API queries at all.

It does not, because I don't know exactly, how the communication between pwb and API works, but this is not an issue of pwb and it looks like it is not an issue in CirrusSearch, therefore it has 80 % probability to be caused by API

As I said, if you believe it's in the API then show me API queries that are not doing what they're supposed to be doing rather than quoting some random pywikibot script. Without that there's nothing I can do here.

Anomie removed a subscriber: Anomie.Jan 17 2017, 5:41 PM
debt added a subscriber: debt.

Looks like this is for Pywikibot to fix, removing Discovery.

JJMC89 lowered the priority of this task from Unbreak Now! to Needs Triage.Jan 19 2017, 11:37 PM

This behavior is correct as far as I can see. If you provide multiple generators (-file and -search), it will work on the pages from the first one, after exhausting the second one and so on. Adding -intersect to the command line should solve this.

Dvorapa closed this task as Invalid.May 28 2017, 9:27 AM

Yes, I forgot -intersect, thank you.