-
Hi I'm new to this project and trying to do as much reading docs and code as I can but am stuck. I'm working my way through some basic python code to do some data analysis on my NHL league. Currently trying to get all drafted players, draft position, and various season (all weeks) stats data. I'm coming across this issue with the get_stats function while calling it for a player from the draft_results of a league. I'm wondering if this is an incorrect approach and there's something I'm missing before accessing player data. Or if there's league settings I may need to adjust. I see that game_code member being used in past_league_id(), and mention of a commissioner config. *Happens with just get_stat() as well: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It looks like manually creating the league ( In the meantime, you can solve this a few other ways
|
Beta Was this translation helpful? Give feedback.
It looks like manually creating the league (
League(ctx, id)
) is not storing the game code on there. That's definitely a bug, thanks for pointing it out!In the meantime, you can solve this a few other ways
league.game_code = 'nhl'
)ctx.get_leagues()
method (league = ctx.get_leagues('nhl', 2023)[0]
)