Page MenuHomePhabricator

integraality crashes when using 'grouping_link' if the English label is missing
Closed, ResolvedPublic


Identified at − although the crash was silent, just resulting in a 502. Had to reproduce manually directly in

When grouping_link is used, integraality looks up the English label of the item (which is debatable, and under re-consideration at T237276: Re-evaluate the grouping-link behaviour ).

However, if the item has no English label, then this fails with:

Traceback (most recent call last):
  File "./integraality/", line 681, in <module>
  File "./integraality/", line 677, in main
  File "./integraality/", line 619, in retrieve_and_process_data
    text += self.make_stats_for_one_grouping(grouping, item_count, higher_grouping)
  File "./integraality/", line 546, in make_stats_for_one_grouping
    label = group_item.labels["en"]
  File "/usr/local/lib/python3.7/site-packages/pywikibot/page/", line 46, in __getitem__
    return self._data[key]
KeyError: 'en'

Event Timeline

This took a long long time to investigate − the crash could be reproduced, but the error would only bubble up on the command line :/

Mentioned in SAL (#wikimedia-cloud) [2021-05-22T12:59:41Z] <wm-bot> <jeanfred> Deploy d4fa363 (T283287)

JeanFred triaged this task as Medium priority.