Page MenuHomePhabricator

listpage.py output is broken by retrieving pages
Closed, ResolvedPublicBUG REPORT

Description

When retrieving a lot of pages the list printed on screen is broken like:

Retrieving 50 pages from wikipedia:de.
...
Retrieving 50 pages from wikipedia:de.
  10 [[Navigationsleiste Waitakere International]]
Retrieving 50 pages from wikipedia:de.
...
Retrieving 50 pages from wikipedia:de.
  11 [[Navigationsleiste Zimbabwe International]]
Retrieving 50 pages from wikipedia:de.
  12 [[Navigationsleiste Zürich E-Prix]]
Retrieving 50 pages from wikipedia:de.
...
12 page(s) found

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as Medium priority.Apr 14 2019, 9:55 AM

Does not happen for me. What command do you use?

Change 503736 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Show page list at the end of the script

https://gerrit.wikimedia.org/r/503736

It orrcures if you combine a pagegenerators generator with a pagegenerators filter, e.g.

pwb listpages -start:Navigationsleiste -namespace:Template -subpage:0 -format:2 -grep:"INHALT\s*=\s*\[\[[^\[\]]+\]\]\s*\}\}" -titleregex:"Navigationsleiste.+" -lang:de -family:wikipedia

I see, outputting to the files works correctly. One can avoid this by redirecting 2>/dev/null or similar, but yeah, should be fixed.

I see, outputting to the files works correctly. One can avoid this by redirecting 2>/dev/null or similar, but yeah, should be fixed.

Please remember the poor Windows users ;)
The given patch solves it nicely.

Xqt changed the subtype of this task from "Task" to "Bug Report".Apr 14 2019, 1:21 PM

Change 503736 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Show page list at the end of the script

https://gerrit.wikimedia.org/r/503736