From 955d2e39dae4c56a3b1da5ccf21e3713700befde Mon Sep 17 00:00:00 2001 From: Christian Wendt Date: Tue, 15 Oct 2024 14:47:44 +0000 Subject: [PATCH] Hockey: Fix Key Error in Player Stats --- espn_api/hockey/player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/espn_api/hockey/player.py b/espn_api/hockey/player.py index dd977ea7..99a53efe 100644 --- a/espn_api/hockey/player.py +++ b/espn_api/hockey/player.py @@ -32,7 +32,7 @@ def __init__(self, data): self.injured = player.get('injured', False) for split in player.get('stats', []): - if split['stats']: + if split.get('stats'): id = split['id'] stat_key = get_stat_key(id)