Skip to content

Getting game events for game with unplayed bottom of final inning causes IndexError #147

@caseyjohnsonwv

Description

@caseyjohnsonwv

Version: 2.5.0

Steps to reproduce:

  1. Choose a game in which the bottom of the 9th inning was not played. For example, game_id 2021_04_03_tormlb_nyamlb_1, the Yankees v Blue Jays game from April 3rd, 2021.
  2. Run mlbgame.events.game_events(id) with the selected game_id value.

Result:

line 48, in game_events
  'bottom': __inning_info(x, 'bottom')
line 17, in __inning_info
  half = inning.findall(part)[0]
IndexError: list index out of range

Edit: this appears to be a duplicate of #137, still open from 2 years ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions