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

Can't read from 2017 games #335

Closed
stermi01 opened this issue Sep 22, 2017 · 3 comments
Closed

Can't read from 2017 games #335

stermi01 opened this issue Sep 22, 2017 · 3 comments

Comments

@stermi01
Copy link

After managing to set my schedule up for 2017 games, I'm still having trouble reading 2017 regular season games. Getting the following error, just trying to get basic info that you had from issue #331 :

I updated nflgame and made sure to update the schedule as well as switch it back. Any idea?

Code:

import nflgame
import csv

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

Error:

TypeError Traceback (most recent call last)
in ()
2 import csv
3
----> 4 games = nflgame.games(2017)
5 print len(games)

C:\Program Files\Anaconda2\lib\site-packages\nflgame_init_.pyc in games(year, week, home, away, kind, started)
227 (as opposed to waiting for a 404 error from NFL.com).
228 """
--> 229 return list(games_gen(year, week, home, away, kind, started))
230
231

TypeError: 'NoneType' object is not iterable

@stermi01
Copy link
Author

had to add the following to the statement

games = nflgame.games(2017, kind = 'REG')

@ochawkeye
Copy link
Contributor

Not sure why that would do anything different for you...'REG' is the default value for kind.
https://github.com/BurntSushi/nflgame/blob/master/nflgame/__init__.py#L192

@stermi01
Copy link
Author

I'm not sure, It was something that ended up happening last year where I had trouble getting individual postseason games and since then I've had some problems, but that seemed to be the solution that worked.

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