nflverse / nfl_data_py

Python code for working with NFL play by play data.
MIT License
272 stars 52 forks source link

get_team_game_log doesn't return game results for current season #67

Closed klassy1016 closed 1 year ago

klassy1016 commented 1 year ago

Took a look at the code and it looks like the issue is that when you're iterating over each game in the season. You're casting the points / yardages values to ints. However, the value that is scraped is an empty string when the game hasn't yet occurred causing the cast to fail.

I'd suggest either wrapping the entire parsing block in a try/except or adding empty string handling to each int cast. Happy to make a PR with each option if you'd like me to.

alecglen commented 1 year ago

Hey @klassy1016! Sorry, which function are you referring to?

klassy1016 commented 1 year ago

Oh wow, my apologies. I posted to the wrong repo. My apologies!