[Bug]: Get_Team_XGoals resulting in a recursion error
Closed this issue · 5 comments
What happened?
While calling get_team_xgoals with an even game state for the regular season, the call isn't able to be completed if I specify multiple seasons on Anaconda. As an example, the below code never resolves.
team_even_xgoals_late = asa_client.get_team_xgoals(season_name="2019,2021", split_by_games = True, stage_name = "Regular Season", even_game_state = True)
However, if I call the following, the code runs:
team_even_xgoals_current = asa_client.get_team_xgoals(season_name="2022", split_by_games = True, stage_name = "Regular Season", even_game_state = True)
The same is true if I just specify one season, i.e. 2019. It looks like it may have something to do with specifying multiple season names.
Happy to help track down the error even further - really great package!
Version
0.1.1
What version of Python or R are you using?
Python 3.7.x
What operating system are you using?
MacOS
Relevant log output
File "/Users/nielsenz/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 495, in __new__
return Index(subarr, dtype=dtype, copy=copy, name=name, **kwargs)
File "/Users/nielsenz/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 391, in __new__
name = maybe_extract_name(name, data, cls)
File "/Users/nielsenz/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 6386, in maybe_extract_name
if name is None and isinstance(obj, (Index, ABCSeries)):
File "/Users/nielsenz/anaconda3/lib/python3.7/site-packages/pandas/core/dtypes/generic.py", line 45, in _check
return getattr(inst, attr, "_typ") in comp
RecursionError: maximum recursion depth exceeded while calling a Python object
Thanks for reporting this! Gonna give this a look over the weekend.
Clearly don't know how GitHub works - apologies!