Page MenuHomePhabricator

KeyError in checkimage.py when processing a page without image content
Closed, ResolvedPublic

Description

Processing a File: page which doesn't have an image content leads to an KeyError:

+ {{Dateiüberprüfung}}

Bot: Markiere mit {{[[Wikipedia:Dateiüberprüfung/Anleitung|DÜP]]}}, da keine Lizenzvorlage gefunden - bitte nicht entfernen, Informationen bald auf der Benutzerdiskussion des Uploaders.
Updating page [[Datei:HeaderMR.png]] via API
No image in imagepage
Execution time: 32140 seconds

Traceback (most recent call last):
  File "C:\pwb\compat\checkimages.py", line 1993, in <module>
    main()
  File "C:\pwb\compat\checkimages.py", line 1979, in main
    if Bot.checkStep():
  File "C:\pwb\compat\checkimages.py", line 1787, in checkStep
    smwl)
  File "C:\pwb\compat\checkimages.py", line 669, in report
    resPutMex = self.tag_image(unver)
  File "C:\pwb\compat\checkimages.py", line 737, in tag_image
    nick = reportPageObject.getLatestUploader()[0]
  File "C:\pwb\compat\wikipedia.py", line 5426, in getLatestUploader
    return [self._latestInfo['user'], self._latestInfo['timestamp']]
KeyError: 'user'

Event Timeline

Xqt claimed this task.
Xqt raised the priority of this task from to Needs Triage.
Xqt updated the task description. (Show Details)
Xqt added a project: Pywikibot-compat.
Xqt subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptJan 19 2015, 11:24 AM
gerritbot subscribed.

Change 185835 had a related patch set uploaded (by Xqt):
[bugfix] Detect KeyError exception instead of NoPage

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

Patch-For-Review

Change 185835 abandoned by Xqt:
[bugfix] Detect PageRelatedError exception instead of NoPage

Reason:
Integrated in I2e04f4020281c1184a240a24d41cc6166880fb68

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

Change-Id: I2e04f4020281c1184a240a24d41cc6166880fb68 merged.
https://gerrit.wikimedia.org/r/#/c/189232/