You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it crashes because when trying to generate a subrank, it looks for metrics[1:], which is an empty list whenever the team standings precedence has only one element in it.
TypeError: itemgetter expected 1 arguments, got 0
(9 additional frame(s) were not displayed)
...
File "draw/manager.py", line 191, in get_teams
generator = TeamStandingsGenerator(metrics, ('rank', 'subrank'), tiebreak="random")
File "standings/base.py", line 294, in __init__
self._interpret_rankings(rankings)
File "standings/base.py", line 393, in _interpret_rankings
annotator = klass(self.precedence)
File "standings/ranking.py", line 97, in __init__
self.rank_key = metricgetter(*metrics[1:])
File "standings/metrics.py", line 23, in metricgetter
metricitemgetter = itemgetter(*items)
TypeError: itemgetter expected 1 arguments, got 0
The text was updated successfully, but these errors were encountered:
Two changes, both of which prevent crashing. The change in
standings/metrics.py prevents the lower level from crashing, and
the change in draw/views.py hides what is then a redundant column.
Two changes, both of which prevent crashing. The change in
standings/metrics.py prevents the lower level from crashing, and
the change in draw/views.py hides what is then a redundant column.
(cherry picked from commit 47dd635)
BACKEND-VR: https://sentry.io/tabbycat-ig/backend/issues/645557194/
I think it crashes because when trying to generate a subrank, it looks for
metrics[1:]
, which is an empty list whenever the team standings precedence has only one element in it.The text was updated successfully, but these errors were encountered: