panzarino/mlbgame

ValueError: Could not find a game with that id.

Open

#52 opened on Jan 17, 2018

View on GitHub
 (21 comments) (0 reactions) (0 assignees)Python (116 forks)batch import
bugenhancementhelp wanted

Repository metrics

Stars
 (509 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Running the same code as before:

def team_games(year,month):
    month = mlbgame.games(year, month)
    games = mlbgame.combine_games(month)
    for game in games:
        print game.game_id
    return games


games = team_games(2016, 5)


and its breaking on random game ids when iterating through.

This one in particular breaks:

stats = mlbgame.team_stats('2016_05_16_bosmlb_kcamlb_1')
era = stats.home_pitching.era
print(era)

Status is also FINAL

Contributor guide