BurntSushi / nfldb

A library to manage and update NFL data in a relational database.
The Unlicense
1.07k stars 263 forks source link

Having trouble updating nfldb #290

Open adilq93 opened 6 years ago

adilq93 commented 6 years ago

Hello, I just downloaded and installed nfldb. I can't seem to update it to have more recent statistics. I can query data from like the 2012 season but can't from the current season.

So I run nfldb-update and I run into this error,

"psycopg2.IntegrityError: insert or update on table "play" violates foreign key constraint "play_pos_team_fkey" DETAIL: Key (pos_team)=(JAX) is not present in table "team"."

I have read a little bit about this from previous issues, but none of the proposed solutions are working for me.

ariannedee commented 6 years ago

insert into team values('JAX','Jacksonville', 'Jaguars'); #194

You will also run into a problem with the LA Chargers, so do this too: insert into team values ('LAC', 'Los Angeles', 'Chargers');