From 65546498c4208ef810492bf38b351d83d8e5c3ae Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 7 Sep 2020 09:11:49 -0700 Subject: [PATCH 1/2] Default stats if week not found --- espn_api/football/box_player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/espn_api/football/box_player.py b/espn_api/football/box_player.py index 798c8247..e2c7eae9 100644 --- a/espn_api/football/box_player.py +++ b/espn_api/football/box_player.py @@ -23,7 +23,7 @@ def __init__(self, data, pro_schedule, positional_rankings, week): self.pro_opponent = PRO_TEAM_MAP[opp_id] self.pro_pos_rank = positional_rankings[posId][str(opp_id)] if str(opp_id) in positional_rankings[posId] else 0 - stats = self.stats.get(week) + stats = self.stats.get(week, {}) self.points = stats.get('points', 0) self.points_breakdown = stats.get('breakdown', 0) self.projected_points = stats.get('projected_points', 0) From 33730788b17a9af350c9d04042dac8c3b9e37466 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 7 Sep 2020 09:16:46 -0700 Subject: [PATCH 2/2] package bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2461804d..9a3c2722 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='espn_api', packages=find_packages(), - version='0.5.0', + version='0.5.1', author='Christian Wendt', description='ESPN API', install_requires=['requests>=2.0.0,<3.0.0'],