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

Error using Roster summary #19

Open
buddha314 opened this issue Feb 20, 2018 · 0 comments
Open

Error using Roster summary #19

buddha314 opened this issue Feb 20, 2018 · 0 comments

Comments

@buddha314
Copy link

The following code

from nhlscrapi.games.game import GameKey, Game
from nhlscrapi.games.rosters import Rosters

gk = GameKey(2015, 2, 224)
r = Rosters(gk)
print(r.home_skaters)

Produces the following error:

python roster.py 
Traceback (most recent call last):
  File "roster.py", line 10, in <module>
    print(r.home_skaters)
  File "/Users/buddha/github/buddha314/nhl-quant-experiments/env/lib/python2.7/site-packages/nhlscrapi/games/repscrwrap.py", line 25, in wrapped
    self._loaded[l] = getattr(attr, loader_name)() is not None
  File "/Users/buddha/github/buddha314/nhl-quant-experiments/env/lib/python2.7/site-packages/nhlscrapi/scrapr/rosterrep.py", line 95, in parse_rosters
    self.rosters[t] = self.__clean_pl_block(self.__blocks[t])
  File "/Users/buddha/github/buddha314/nhl-quant-experiments/env/lib/python2.7/site-packages/nhlscrapi/scrapr/rosterrep.py", line 60, in __clean_pl_block
    num = int(txt[0]) if txt[0].isdigit() else max(r.keys())+1
ValueError: max() arg is an empty sequence

It wouldn't surprise me at all if I was using the library incorrectly. Please let me know what I'm doing wrong. 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

1 participant