-
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
JAX vs JAC: nfldb-update fails #186
Comments
Sorry..failed to mention the above install is on a Windows PC..not sure if that matters or not.. |
The proposed solutions being batted around in the issue you referenced were not how @BurntSushi ultimately ended up handling the change from What version of This might all be resolved by |
How do I find out what version I have installed ? |
I don't think it would unless you manually download the |
I've also tried updating TEAM table back to JAC but then I get an error saying JAX not found when I run nfldb-update. |
version info: |
If you're absolutely against upgrading Change your team table back to JAC and then change I think your best bet is probably to upgrade to the latest and greatest though. |
Ran the update..seemed to go ok and my custom stuff is still there: Downloading/unpacking nflgame>=1.2.20 (from nfldb) Downloading/unpacking psycopg2 from https://pypi.python.org/packages/a4/0e/29d29dceca6e465804ae612bc711a4741599ac849cf0a99acdbf53838581/psycopg2-2.6.2-cp27-none-win_amd64.whl#md5=08d618f1c5a4db211481e59102cc16f8 (from nfldb) Found existing installation: nflgame 1.2.18 Found existing installation: psycopg2 2.6.1 should I leave the TEAM entry as JAX or change it back to JAC..I'm assuming change back to JAC ? Anything else I need to do before retrying nfldb-update ? |
Tried this:
output: C:\Python27\Scripts>python nfldb-updateSTARTING NFLDB UPDATE AT 2016-09-09 15:50:32.191000 After I ran pip install --upgrade nfldb earlier, my team table had 34 entries....all normal entries plus one for UNK and the new LA entry. I then updated JAX to JAC..ran the updates mentioned in this comment and get the error that LA already exists... should I delete the LA entry in teams and try again ? There are no GAMES with home/away team = 'LA' but there ARE players with team='LA'..looks like I would need to delete those first before deleting the LA team record. |
You should never ever ever be inserting rows into the |
I agree but I wasn't aware of the automated pip install - upgrade nfldb process until now. Now that it's there should I delete all of the player data for team=LA (or should I update them to team='STL' ?) and then delete the team record for LA and then run nfldb-update ? |
You could do that. Or just start fresh with the DB linked at the bottom of the README. |
Ran the following: and then ran nfldb-update worked like a charm...I'm up and running Thanks to both ochawkeye and BurntSushi ! |
I have nfldb installed w/ POSTGRES db..My job involves Oracle DATABASE development so I'm able to figure out POSTGRES well enough ..I've also done lots of program development but I am BRAND NEW to Python and JSON. I've had NFLDB installed since last season and last year had no problems running nfldb-udpate weekly but this year I'm seeing failures on both the STL-LA and JAC-JAX issue. I followed advice in issue #201 to update entry in TEAM table from JAC to JAX and updated the following entries in nfldb/team.py and nflgame/init.py:
['JAC', 'Jacksonville', 'Jaguars', 'Jacksonville Jaguars', 'JAX'],
to
['JAX', 'Jacksonville', 'Jaguars', 'Jacksonville Jaguars', 'JAC'],
Now though when I run nfldb-udate, I get error message :
psycopg2.IntegrityError: insert or update on table "play" violates foreign key constraint "play_pos_team_fkey"
DETAIL: Key (pos_team)=(JAC) is not present in table "team".
I'm GUESSING that the update scrapes data and assigns team codes based on the entries in the nfldb/team.py and nflgame/init.py files and that now the Jacksonville players should come in as JAX and not JAC...is that right ? If so, why would I be getting this error-that leads me to believe data or Jacksonville players is coming in as JAC in spite of my updates to those files. I've seen other suggestions to run this :
python nfldb-update --player-interval 0
I've done that thinking that forces an update of the player data which is trying to be inserted (maybe I had old temp data w/ JAC instead of JAX that it is trying to load to db ?)
I've also forced a schedule update with:
python update_sched.py --year 2016
That works but no data is inserted to db..does this just pull down temp data that is then inserted by nfldb-update ?
I've scoured numerous issues and searched on JAX, JAC, etc. but can't find any solution that works (nor, curiously, anyone else with my exact issue).
What am I missing !?
Thanks in advance !
The text was updated successfully, but these errors were encountered: