From e34ea6da27789137e74d9958cb02b773c94358ec Mon Sep 17 00:00:00 2001 From: Simon Grasse <s.grasse@fz-juelich.de> Date: Wed, 24 Apr 2024 15:15:38 +0200 Subject: [PATCH] fix: load content of response not response --- toargridding/toar_rest_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/toargridding/toar_rest_client.py b/toargridding/toar_rest_client.py index 82b113a..e4dad05 100644 --- a/toargridding/toar_rest_client.py +++ b/toargridding/toar_rest_client.py @@ -142,10 +142,12 @@ class AnalysisService: timeseries = self.get_clean_timeseries(timeseries, metadata) return AnalysisRequestResult(timeseries, coords, metadata) - def get_timeseries_and_metadata(self, metadata: Metadata): + def get_timeseries_and_metadata( + self, metadata: Metadata + ) -> tuple[pd.DataFrame, pd.DataFrame]: query_options = QueryOptions.from_metadata(metadata) - content = self.connection.get(query_options) - timeseries, timeseries_metadata = self.load_data(content, metadata) + result = self.connection.get(query_options) + timeseries, timeseries_metadata = self.load_data(result.content, metadata) return timeseries, timeseries_metadata def get_clean_coords(self, timeseries_metadata): -- GitLab