BurntSushi / nfldb

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

2017 Rosters #255

Open Toarzo opened 7 years ago

Toarzo commented 7 years ago

Hello, I followed the instructions to install the db, i did the nfldb-update, but i noticed the rosters are 2016's.

import nfldb

db = nfldb.connect() q = nfldb.Query(db)

players = q.player(team = "MIN").as_players() for pp in players: print pp.full_name

return

Kyle Rudolph David Morgan Chad Greenway Trae Waynes Brian Robison Antone Exum Shaun Hill Terence Newman Jeff Locke Laquon Treadwell Jabari Price Rhett Ellison Jeremiah Sirles Zach Line Captain Munnerlyn Justin Trattou Adam Thielen Shamar Stephen T.J. Clemmings Joe Berger Sam Bradford Jayron Kearse Eric Kendricks Zac Kerin Kentrell Brothers Charles Johnson Scott Crichton Andrew Sendejo MyCole Pruitt Alex Boone Brandon Fusco Everson Griffen Jerick McKinnon Nick Easton Marcus Sherels Harrison Smith Emmanuel Lamur Linval Joseph Matt Asiata Tom Johnson Mackensie Alexander Anthony Barr Blair Walsh Jarius Wright Audie Cole Matt Kalil Edmond Robinson Teddy Bridgewater Michael Griffin Stefon Diggs Cordarrelle Patterson Sharrif Floyd Xavier Rhodes Adrian Peterson Andre Smith Danielle Hunter Kevin McDermott Anthony Harris

Which is the 2016 roster Is there something I did wrong ?

Thank you !

Toarzo commented 7 years ago

I think it could fix if I run python nflgame-update-players, though I am having an error when running it :

C:\Python27\Scripts>python nflgame-update-players Loading games for PRE 2017 week 2 Finding (profile id -> gsis id) mapping for players... 369/528 complete. (69.89%)Traceback (most recent call last): File "nflgame-update-players", line 4, in nflgame.update_players.run() File "C:\Python27\lib\site-packages\nflgame\update_players.py", line 386, in run for i, t in enumerate(pool.imap(fetch, players.items()), 1): File "C:\Python27\lib\multiprocessing\pool.py", line 668, in next raise value socket.timeout: timed out Exception in thread Thread-3 (most likely raised during interpreter shutdown):

EDIT : I solved this problem by changing def new_http(): http = httplib2.Http(timeout=10) http.follow_redirects = True return http

into

def new_http(): http = httplib2.Http(timeout=30) http.follow_redirects = True return http

in update_players.py But still the rosters are not good