Skip to content
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

Missing MIA @ TB 2017 game (2017091006) #74

Closed
vslobody opened this issue Aug 26, 2019 · 6 comments
Closed

Missing MIA @ TB 2017 game (2017091006) #74

vslobody opened this issue Aug 26, 2019 · 6 comments
Assignees

Comments

@vslobody
Copy link

vslobody commented Aug 26, 2019

when i do:

key = '2017091006'
schedule_games = nflgame.sched.games
game = schedule_games[key]

i get
{**u'week': 1**, u'meridiem': u'PM', u'gamekey': u'57241', u'season_type': u'REG', u'away': u'**TB**', u'year': 2017, u'month': 9, u'eid': u'**2017091006**', u'time': u'1:00', u'home': u'**MIA**', u'wday': u'Sun', u'day': 10}

now, if i do:
games_as_home = nflgame.games(game['year'], home = game['home'], kind='REG', started=True)
I would expect to see the game to show as the first entry, but instead i see:
games_as_home[0] - Game: NO (20) at MIA (0)
Any idea what is going on? Why i see NO as away team instead of TB?

@derek-adair
Copy link
Owner

What are you trying to do?

If you have the eid of a game you can simply call nflgame.game.Game({eid}) and it will grab the Game object for said game.

You are getting this because nflgame.games() actually returns a python generator of Game objects, as per the docs. The documentation is QUITE thurough and worthy of a good look.

@derek-adair
Copy link
Owner

Also it is ambiguous what you are actually passing in this query, what are the values of each of those variables you are passing to nflgame.games?

@derek-adair derek-adair self-assigned this Aug 26, 2019
@vslobody
Copy link
Author

sorry i was unclear. let me try to explain what i am trying to do.
for each game from
schedule_games = nflgame.sched.games
i want to get statistical data for both home and away team
I have noticed that for
key = '2017091006'
i am getting the game
game = schedule_games[key]
that has home team
u'home': u'**MIA**'
and away team
u'away': u'**TB**'
now, i want to see all the games for the home team in that year:
games_as_home = nflgame.games(game['year'], home = game['home'], kind='REG', started=True)
i do not see this game (TB MIA) for the week 1.

@JimHewitt
Copy link

That game was cancelled because of hurricane Irma and rescheduled as 2017111911 in week 11.

@derek-adair derek-adair changed the title inconsistencies between method Missing MIA @ TB 2017 game (2017091006) Aug 26, 2019
@derek-adair
Copy link
Owner

oh right. That makes more sense. I think its best for any game that is cancelled or will never have game-center json be removed from the schedule dictionary.

@derek-adair
Copy link
Owner

Closing b/c i've filed #76 which will resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants