Page MenuHomePhabricator

replace.py breaks articles
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Run the following on toolforge on cswiki:

$ python3 pwb.py replace -regex -nocase "\[\[Kategorie:Údržba:Články s referencemi v nadpisech\]\]\s*" "" -summary:"Robot: reference vyjmuty z nadpisů" -search:'-insource:/\<\/ref\> *==/ incategory:"Údržba:Články s referencemi v nadpisech"' -always

Expected behavior
https://cs.wikipedia.org/w/index.php?title=Samsung_Health&diff=prev&oldid=20839352
(last correct)

Current behavior
https://cs.wikipedia.org/w/index.php?title=Markvartici&diff=prev&oldid=20890545
(first broken)

Configuration
Toolforge grid, Python 3.5.3, Pywikibot master

See original bug report here: https://cs.wikipedia.org/wiki/Diskuse_s_wikipedistou:Dvorapa#Robot:_reference_vyjmuty_z_nadpis%C5%AF;_kosmetick%C3%A9_%C3%BApravy

Event Timeline

Dvorapa triaged this task as High priority.Feb 7 2022, 9:03 PM
Dvorapa updated the task description. (Show Details)
Dvorapa added a subscriber: Xqt.
Dvorapa renamed this task from replace.py doesn't work anymore to replace.py breaks articles.Feb 7 2022, 9:07 PM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)

Identified rPWBC15b2db3906276030b8b475c66c3d2ad4ce8eddc0 as a source of trouble. Reverting for now

@Xqt no problem. Pretty weird, I think there might have been an issue within command line parameter parsing code section. Have you found the cause already?

Oh, I found the issue, you have already solved it in the new commit :)