-
Notifications
You must be signed in to change notification settings - Fork 263
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
Post Season #136
Comments
Update nfldb, e.g., |
Perfect, Thanks |
Thanks! |
Is this something I should be doing on a regular basis? |
@mrg1999 At the very least, when the season transitions to the postseason, then you should. If you want to get bug fixes, then you should do it on a regular basis. |
I'm on a mac and it looks like you're running windows (and I think the system was originally developed for linux) so maybe that's a clue to the problem? |
I'm in the same situation as @Remedine, I ran |
Me too, I installed everything this weekend on a server with Ubuntu 12.04. I ran I ran Then I tried to run |
I ran into the same problem on a Linux box and updating nfldb as outlined above by @BurntSushi did not resolve the issue. I was able to however resolve this issue by manually rebuilding the 2015 postseason schedule by running: then running nfldb-update again once the schedule.json file was update by the above. This resolution was also highlighted by @ochawkeye as a possible solution under this issue reported for nflgame. |
@hpadmanabhan This worked! Thanks! |
…N file when nfldb-update is called with --update-schedules to pick up schedule changes instead of simply just refreshing the database from the existing file as it then requires a separate manual call to nflgame.update_sched to pick up the schedule changes in the interim when running nfldb-update after a gap period.
After reviewing the code further the issue as I see it is that nfldb-update relies on nflgame schedule JSON being up-to-date to load all updates. The issue of having to wait for @BurntSushi to switch the source when transitioning from regular to post season and vice versa is an issue in the nflgame code that needs to be addressed separately. The additional issue with nfldb is that if you don't get the code updates right away and run nfldb-update you end up with this issue where you only get the updates for whatever schedule updates got pushed in schedule.json (playoff week 1) with the patch and whatever the current week happens to be (playoff week 5). |
Just chiming in to mention this is still an issue. I updated nflgame, nfldb, ran "nfldb-update --update-schedules ", but still had to run "<python 2 home lib>/site-packages/nflgame/update_sched.py --rebuild --year 2016 --phase POST" to get last weeks games in. No biggie, thanks for fix here!! |
If nothing else works you can simply edit the file /nflgame/live.py and change the variable: i.e.
|
I wasn't getting any of postweek 1 scores so I rebuilt the schedule file with
|
You shouldn't have to rebuild it every week, no. To tell you the truth,
though, I'm not sure why you had to last week.
After updating nflgame to grab the proper schedule URL for the playoffs
nfldb just worked for me.
…On Jan 14, 2017 8:35 AM, "mrg1999" ***@***.***> wrote:
I wasn't getting any of postweek 1 scores so I rebuilt the schedule file
with
/site-packages/nflgame/update_sched.py --rebuild --year 2016 --phase POST
Question: will I need to run this every week during the post season?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#136 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC237Qs2e5H8zghKopkzoOkDfzPX4vY4ks5rSN0YgaJpZM4HBuZf>
.
|
Looks like I'm updating nfldb only. |
Not knowing when you ran which commands I'd just be guessing. If you ran I will say this: if you are successfully able to currently see Wildcard results I'm confident that 1) An easy way to check if your import nflgame
for game in nflgame.live._games_in_week(2016, 2, 'POST'):
print game
Or with import nfldb
db = nfldb.connect()
q = nfldb.Query(db)
q.game(season_year=2016, season_type='Postseason')
for game in q.as_games():
print game
|
After |
Manually updating nflgame & nfldb fixed this issue for me. Related issue I didn't see elsewhere: Can Query handle aggregating regular season & postseason results? For example: q = nfldb.Query(db) for i in q.as_games(): ... does not return anything. Whereas each separate q.game(season_type = '') query does. Any suggestions on how to aggregate other than running separately and combining manually? |
Editing this down to one comment so I don't look like a crazy(-ier) person when I look back on this post a year from now. When you tell Your query of grabbing only the last 3 weeks of the regular season and first 2 weeks of the postseason presents an interesting challenge and one that isn't directly referenced in the wiki A way to combine these separate queries is by joining the conjunctive queries disjunctively with the import nfldb
db = nfldb.connect()
end_of_reg = nfldb.Query(db)
end_of_reg.game(season_year=2016, season_type='Regular', week=[15, 16, 17])
beg_of_post = nfldb.Query(db)
beg_of_post.game(season_year=2016, season_type='Postseason', week=[1, 2])
last_five_games = nfldb.QueryOR(db)
last_five_games.orelse(end_of_reg)
last_five_games.orelse(beg_of_post)
print len(last_five_games.as_games())
Sorry for the stream of self-replies and if I sound like a total ass it's because I'm using words that have never come out of my own mouth before and are more or less vocabulary out of @BurntSushi wiki entry and rearranged to express the opposite concept. |
Not at all! Thank you for the lengthy explanation. I saw "andalso" in the documentation but missed "orelse". Good find! |
Are stats available for the post season (game day, game time)?
I've tried:
q = nfldb.Query(db)
q.game(season_year=2015, season_type='Postseason', week = 1)
for g in q.as_games():
print g
I've also tried no week and week = 18 with the season_type set to 'Regular' and 'Postseason'
The text was updated successfully, but these errors were encountered: