Page MenuHomePhabricator

image.py does not respect lower cased namepaces
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):
pwb image Aktendulli.jpeg -site:wikipedia:de

What happens?:

Retrieving 1 pages from wikipedia:de.
No changes were necessary in [[Diskussion:Sprachgebrauch in der DDR/Archiv/1]]

1 pages read
0 pages written
0 pages skipped
Execution time: 1 seconds
Read operation time: 1.0 seconds
Script terminated successfully.

What should have happened instead?:

C:\pwb\GIT\core>pwb image Aktendulli.jpeg
Retrieving 1 pages from wikipedia:de.


>>> Diskussion:Sprachgebrauch in der DDR/Archiv/1 <<<
@@ -40 +40 @@
- Das ist ein Aktendulli [[bild:Aktendulli.jpeg]] [[Benutzer:Momomu|momomu]] 21:00, 15. Jan 2003 (CET)
+ Das ist ein Aktendulli  [[Benutzer:Momomu|momomu]] 21:00, 15. Jan 2003 (CET)

Do you want to accept these changes? ([y]es, [N]o, [e]dit original, edit
[l]atest, open in [b]rowser, [m]ore context, [a]ll, [q]uit):

Event Timeline

Xqt renamed this task from image.py does not respect lower cased namedpaces to image.py does not respect lower cased namepaces.Apr 1 2022, 8:17 AM
Xqt claimed this task.
Xqt triaged this task as High priority.

Change 776158 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Respect lowercased namespace with image.py

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

Change 776158 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Improve image regex

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

Does not work with Python 3.5:
raise source.error("unknown flag", len(char))\r\nsre_constants.error: unknown flag at position 9\r\nCRITICAL: Exiting due to uncaught exception <class \'sre_constants.error\'>\r\n

Change 777297 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Python 3.5 does not support inline flags inside groups

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

Change 777297 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Python 3.5 does not support inline flags inside groups

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