Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I get the 2016 schedule?


import nfldb

db = nfldb.connect()
q = nfldb.Query(db), season_type='Regular', week=1)

for game in q.as_games():
    print game

yields nothing. Will the schedule automatically become available?

I tried 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 ./ --rebuild and a python ./ --rebuild --year 2016. I then did nfldb-update and nfldb-update --update-schedule

Is doing the modification @ochawkeye described here still necessary? Or am I doing something else wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

dawebercommented, Aug 24, 2016

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\ (uncomment line 68 _CUR_SCHEDULE = “” & comment out line 75 _CUR_SCHEDULE =")

Step 2: run --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/ and nflgame/, 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/ /usr/local/lib/python2.7/dist-packages/nflgame/

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!

hpadmanabhancommented, Aug 15, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NFL 2016 - WEEK 1 Schedule
Monday, September 12th ; Bills. Dolphins. Patriots ; Chiefs. Raiders. Broncos ; Steelers. Browns. Ravens ; Titans. Colts. Texans ; Giants. Washington. Eagles....
Read more >
2016 NFL Weekly League Schedule
Check out the 2016 NFL Weekly League Schedule including AFC and NFC results and standings on
Read more >
2016 NFL Schedule Announced - NFL Communications
2016 NFL Schedule Announced ; Indianapolis Colts at Jacksonville Jaguars (London). 2:30p (BST). 9:30a ; Carolina Panthers at Atlanta Falcons. 1:00p (ET). 1:00p....
Read more >
2016 NFL schedule release: Here's the time and date for all ...
The Broncos will play on Christmas night at Kansas City against the rival Chiefs. Here is the full 2016 NFL schedule: Week 1....
Read more >
San Francisco 49ers Schedule 2016 - ESPN
WK DATE OPPONENT RESULT W‑L Hi Pass Hi Rush Hi Rec 1 Mon, 9/12 vs LAR W28‑0 1‑0 Gabbert 170 Hyde 88 Kerley 61 2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found