From ff4954d175c15eb05d77c49b1e4c87236f9376e2 Mon Sep 17 00:00:00 2001 From: Shayaan Wadkar <82843611+Shom770@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:47:04 -0500 Subject: [PATCH] Update functions.py --- src/utils/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/functions.py b/src/utils/functions.py index 7079090..28df00d 100644 --- a/src/utils/functions.py +++ b/src/utils/functions.py @@ -1,6 +1,6 @@ """Defines utility functions that are later used in FalconVis.""" from io import StringIO -from json import load +from json import load, loads from re import search from typing import Any @@ -48,7 +48,7 @@ def retrieve_scouting_data() -> DataFrame: :return: A dataframe containing the scouting data from an event. """ scouting_data = DataFrame.from_dict( - get(EventSpecificConstants.URL).json() + loads(get(EventSpecificConstants.URL).text) ) scouting_data[Queries.MATCH_NUMBER] = scouting_data[Queries.MATCH_KEY].apply( lambda match_key: int(search(r"\d+", match_key).group(0))