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..811d5082 100644 --- a/geoengine/workflow.py +++ b/geoengine/workflow.py @@ -584,9 +584,9 @@ 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, + additional_headers=session.auth_header, open_timeout=open_timeout, max_size=None, ) as websocket: @@ -791,9 +791,9 @@ 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, + 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: