2016 ScheduleSee original GitHub issue
How can I get the 2016 schedule?
import nfldb db = nfldb.connect() q = nfldb.Query(db) q.game(season_year=2016, season_type='Regular', week=1) for game in q.as_games(): print game
yields nothing. Will the schedule automatically become available?
pip install --upgrade nfldb and
pip install --upgrade nflgame (even though I am pretty sure an nfldb update also updates nflgame. I also did a
python ./update_sched.py --rebuild and a
python ./update_sched.py --rebuild --year 2016. I then did
- Created 7 years ago
- Comments:13 (1 by maintainers)
Top GitHub Comments
In case anyone else comes here looking for an answer, here are the steps that worked for me.
Step 1 (per ochawkeye):
If you manually flip-flop the schedule back to the regular season URL in file …\nflgame\live.py (uncomment line 68 _CUR_SCHEDULE = “http://www.nfl.com/liveupdate/scorestrip/ss.xml” & comment out line 75 _CUR_SCHEDULE = http://www.nfl.com/liveupdate/scorestrip/postseason/ss.xml")
Step 2: run update_sched.py --year 2016 --phase REG
Step 3: Manually add [LA, Los Angeles, Rams] to teams table. I also did (per danielcroona):
You should edit the files nfldb/team.py and nflgame/init.py, and add the following line: [‘LA’, ‘Los Angeles’, ‘Rams’, ‘Los Angeles Rams’],
On my machine the location for these files are: /usr/local/lib/python2.7/dist-packages/nfldb/team.py /usr/local/lib/python2.7/dist-packages/nflgame/init.py
But… I don’t know how to get those changes to take effect, hence the manually added part.
Step 4: run nfldb-update
Step 5 (maybe): revert changes from Step 1 and run nfldb-update again. I think this is what was meant by “flip-flop”, but changing it back didn’t seam to do anything (presumabley because there is no postseason yet).
@BurntSushi Please let me know if any of this is wrong. Also, what would I of had to do to make the changes of step 3 work without manually adding the new team record?
Thanks again, I really love nfldb!
@expectopatronum no apologies needed, things don’t often have the exact titles but when dealing with open source stuff its always good to check a little deeper first before putting up new issues out of courtesy to the main authors as their precious free time spent on these open source projects out of their generosity would be better spent on improving stuff than dealing with repeated queries.
With reference to the Rams, these are 2 different teams, replacing ‘STL’ with ‘LA’ will lose you all the history for ‘STL Rams’ since all the DB references will get switched. All historical data needs to continue to be associated with ‘STL Rams’ and new stuff needs to be associated with ‘LA Rams’. Particularly important with nfldb that changes be idempotent since you should be able to drop and recreate the database if needed.
EDIT: Also,just FYI, the snippet identified by @danielcroona above is only part of the solution, you will find the additional changes needed in the comment from where he picked out that snippet.