From aef4889324bba2fc926c0c61df925036d3ea1692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Dr=C3=B6nner?= Date: Fri, 29 Aug 2025 15:29:32 +0200 Subject: [PATCH 1/2] fix adapt to changes --- geoengine/__init__.py | 2 +- geoengine/datasets.py | 4 ++-- geoengine/workflow.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/geoengine/__init__.py b/geoengine/__init__.py index 9dca56c0..5b1b0b79 100644 --- a/geoengine/__init__.py +++ b/geoengine/__init__.py @@ -36,7 +36,7 @@ LogarithmicGradientColorizer from .datasets import upload_dataframe, StoredDataset, add_dataset, volumes, AddDatasetProperties, \ delete_dataset, list_datasets, DatasetListOrder, OgrSourceDatasetTimeType, OgrOnError, \ - add_or_replace_dataset_with_permissions, dataset_info_by_name + add_or_replace_dataset_with_permissions, dataset_info_by_name, OgrSourceTimeFormat DEFAULT_USER_AGENT = f'geoengine-python/{geoengine_openapi_client.__version__}' diff --git a/geoengine/datasets.py b/geoengine/datasets.py index 05b4ae5b..279b77d6 100644 --- a/geoengine/datasets.py +++ b/geoengine/datasets.py @@ -223,7 +223,7 @@ class StartEndOgrSourceDatasetTimeType(OgrSourceDatasetTimeType): def to_api_dict(self) -> geoengine_openapi_client.OgrSourceDatasetTimeType: return geoengine_openapi_client.OgrSourceDatasetTimeType( geoengine_openapi_client.OgrSourceDatasetTimeTypeStartEnd( - type="startEnd", + type="start+end", start_field=self.start_field, start_format=self.start_format.to_api_dict(), end_field=self.end_field, @@ -243,7 +243,7 @@ class StartDurationOgrSourceDatasetTimeType(OgrSourceDatasetTimeType): def to_api_dict(self) -> geoengine_openapi_client.OgrSourceDatasetTimeType: return geoengine_openapi_client.OgrSourceDatasetTimeType( geoengine_openapi_client.OgrSourceDatasetTimeTypeStartDuration( - type="startDuration", + type="start+duration", start_field=self.start_field, start_format=self.start_format.to_api_dict(), duration_field=self.duration_field diff --git a/geoengine/workflow.py b/geoengine/workflow.py index fd08f377..94fb56ca 100644 --- a/geoengine/workflow.py +++ b/geoengine/workflow.py @@ -584,7 +584,7 @@ async def raster_stream( if url is None: raise InputException('Invalid websocket url') - async with websockets.asyncio.client.connect( + async with websockets.connect( uri=self.__replace_http_with_ws(url), extra_headers=session.auth_header, open_timeout=open_timeout, @@ -791,7 +791,7 @@ def process_bytes(batch_bytes: Optional[bytes]) -> Optional[gpd.GeoDataFrame]: if url is None: raise InputException('Invalid websocket url') - async with websockets.asyncio.client.connect( + async with websockets.connect( uri=self.__replace_http_with_ws(url), extra_headers=session.auth_header, open_timeout=open_timeout, From 9e0e5a649b6279da2e47613df814d8d4affaa6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Dr=C3=B6nner?= Date: Fri, 29 Aug 2025 15:36:42 +0200 Subject: [PATCH 2/2] additional_headers --- geoengine/workflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geoengine/workflow.py b/geoengine/workflow.py index 94fb56ca..811d5082 100644 --- a/geoengine/workflow.py +++ b/geoengine/workflow.py @@ -586,7 +586,7 @@ async def raster_stream( async with websockets.connect( uri=self.__replace_http_with_ws(url), - extra_headers=session.auth_header, + additional_headers=session.auth_header, open_timeout=open_timeout, max_size=None, ) as websocket: @@ -793,7 +793,7 @@ def process_bytes(batch_bytes: Optional[bytes]) -> Optional[gpd.GeoDataFrame]: async with websockets.connect( uri=self.__replace_http_with_ws(url), - extra_headers=session.auth_header, + additional_headers=session.auth_header, open_timeout=open_timeout, max_size=None, # allow arbitrary large messages, since it is capped by the server's chunk size ) as websocket: