-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Could not find a game with that id. #50
Comments
@Hisairnessag3 It appears that the game id is invalid, or there is no way to get data for that game. Either way, it appears that mlb does not have any stats information for that game id. My guess is that the game was cancelled (or something of the like) and therefore does not have any stats data. |
uh, I would take a look. this code breaks with the same error: def year_games(year):
games = year_games(2017)
latest version as well. Have tried the individual game ids also obviously. |
@Hisairnessag3 Can you tell me what the |
|
It's an issue with |
It looks like MLB made some changes to how they serve out the files. You can no longer browse directory structure of gd2.mlb.com. If you request the url with the extra
If you remove the extra |
Fixed in #51 and will be included in the next release coming soon. |
Work around for anyone looking to continue pulling the yearly Batting and Pitching files... Add an extra forward slash / at the end of the URI
|
Whats causing this? Just started happening.
code:
import mlbgame
stats = mlbgame.player_stats('2014_06_07_miamlb_chnmlb_1')
for player in stats.home_batting:
print(player.h)
The text was updated successfully, but these errors were encountered: