BurntSushi / nflgame

An API to retrieve and read NFL Game Center JSON data. It can work with real-time data, which can be used for fantasy football.
http://pdoc.burntsushi.net/nflgame
The Unlicense
1.27k stars 412 forks source link

2017 week 1-8 is missing #343

Closed mrr-phys closed 6 years ago

mrr-phys commented 6 years ago

Hi, I get this error:

TypeError Traceback (most recent call last)

in () ----> 1 games = nfl.games(2017,week=3) 2 players = nfl.combine(games) /Users/mrr/anaconda2/lib/python2.7/site-packages/nflgame/__init__.pyc in games(year, week, home, away, kind, started) 227 def games_gen(year, week=None, home=None, away=None, 228 kind='REG', started=False): --> 229 """ 230 games returns a generator of all games matching the given criteria. Each 231 game can then be queried for player statistics and information about TypeError: 'NoneType' object is not iterable
mrr-phys commented 6 years ago

The output after running the code below is 1:

import nflgame games = nflgame.games(2017) print len(games)

mtdiedrich commented 6 years ago

ochawkeye's solution in this thread solved the issue for me. Have a crack at it, if you haven't already.

mrr-phys commented 6 years ago

Thank you!