diff --git a/setup.py b/setup.py index 5d86043..e5296bb 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="statsbombpy", - version="1.13.0", + version="1.13.1", description="easily stream StatsBomb data into Python", long_description=README, long_description_content_type="text/markdown", diff --git a/statsbombpy/sb.py b/statsbombpy/sb.py index bb8b822..151a91a 100755 --- a/statsbombpy/sb.py +++ b/statsbombpy/sb.py @@ -175,10 +175,11 @@ def frames( frames = _360_frames(match_id, creds) for frame in frames: if "distances_from_edge_of_visible_area" in frame: - for ff, d_from_vis_area in zip( - frame["freeze_frame"], frame["distances_from_edge_of_visible_area"] - ): - ff["distance_from_edge_of_visible_area"] = d_from_vis_area["distance"] + if frame["distances_from_edge_of_visible_area"] is not None: + for ff, d_from_vis_area in zip( + frame["freeze_frame"], frame["distances_from_edge_of_visible_area"] + ): + ff["distance_from_edge_of_visible_area"] = d_from_vis_area["distance"] keys = ["event_uuid", "visible_area", "match_id", "freeze_frame"] frames = [{key: frame[key] for key in keys} for frame in frames] if fmt == "dataframe":