Skip to content
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

Errors while updating for week 12 (2013) #12

Closed
atestu opened this issue Nov 26, 2013 · 2 comments
Closed

Errors while updating for week 12 (2013) #12

atestu opened this issue Nov 26, 2013 · 2 comments

Comments

@atestu
Copy link

atestu commented Nov 26, 2013

Here's the full output of nfldb-update:


STARTING NFLDB UPDATE AT 2013-11-26 00:09:01.645936
Connecting to nfldb... done.
Setting timezone to UTC... done.
Updating player JSON database... (last update was 2013-11-17 23:03:18.200011+00:00)
Loading games for REG 2013 week 12
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/site-packages/nflgame/update_players.py", line 480, in <module>
    run()
  File "/usr/local/lib/python2.7/site-packages/nflgame/update_players.py", line 367, in run
    players = dict(players_from_games(metas, games))
  File "/usr/local/lib/python2.7/site-packages/nflgame/update_players.py", line 245, in players_from_games
    for d in g.drives:
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 407, in __getattr__
    self.__drives = _json_drives(self, self.home, self.data['drives'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 675, in _json_drives
    d = Drive(game, i, home_team, data[str(drive_num)])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 520, in __init__
    self.__plays = _json_plays(self, data['plays'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 698, in _json_plays
    plays.append(Play(drive, playid, data[playid]))
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 598, in __init__
    self.events = _json_play_events(data['players'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 741, in _json_play_events
    statvals = nflgame.statmap.values(info['statId'], info['yards'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/statmap.py", line 54, in values
    yards = int(yards)
TypeError: int() argument must be a string or a number, not 'NoneType'
`/usr/local/opt/python/bin/python2.7 -m nflgame.update_players --no-block` failed (exit status 1)
Locking write access to tables... done.
Updating season phase, year and week... done.
Bulk inserting data for 17 games...
    Sending batch of data to database.
Traceback (most recent call last):
  File "/usr/local/bin/nfldb-update", line 413, in <module>
    doit()
  File "/usr/local/bin/nfldb-update", line 403, in doit
    update(db, player_interval=args.player_interval)
  File "/usr/local/bin/nfldb-update", line 339, in update
    bulk_insert_game_data(cursor, scheduled)
  File "/usr/local/bin/nfldb-update", line 162, in bulk_insert_game_data
    g = game_from_id(cursor, gsis_id)
  File "/usr/local/bin/nfldb-update", line 55, in game_from_id
    return nfldb.Game._from_nflgame(cursor.connection, g)
  File "/usr/local/lib/python2.7/site-packages/nfldb/types.py", line 2048, in _from_nflgame
    for drive in g.drives:
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 407, in __getattr__
    self.__drives = _json_drives(self, self.home, self.data['drives'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 675, in _json_drives
    d = Drive(game, i, home_team, data[str(drive_num)])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 520, in __init__
    self.__plays = _json_plays(self, data['plays'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 698, in _json_plays
    plays.append(Play(drive, playid, data[playid]))
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 598, in __init__
    self.events = _json_play_events(data['players'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/game.py", line 741, in _json_play_events
    statvals = nflgame.statmap.values(info['statId'], info['yards'])
  File "/usr/local/lib/python2.7/site-packages/nflgame/statmap.py", line 54, in values
    yards = int(yards)
TypeError: int() argument must be a string or a number, not 'NoneType'

I'm running version 0.0.14 (just did a pip install -U nfldb. I've updated in the past without any issue but it didn't work today. Am I doing something wrong?

@BurntSushi
Copy link
Owner

If you update to nflgame 1.1.25, this should be fixed. Thanks for the report!

e.g., pip install -U nflgame.

@atestu
Copy link
Author

atestu commented Nov 26, 2013

@BurntSushi that fixed it! thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants