From 95da28a6d9c04d49eae42ef2edfe47654d834790 Mon Sep 17 00:00:00 2001 From: Ben van Basten Date: Fri, 8 Dec 2023 10:51:48 +0100 Subject: [PATCH] Fixed issue that no netcdf could be loaded in Water Depth Algorithm (caused by h5py breaking change) (#966) --- CHANGES.rst | 2 +- processing/threedidepth_algorithms.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8314007e..404f0d08 100755 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ 3.4 (unreleased) ---------------- -- Nothing changed yet. +- Fixed issue that no netcdf could be loaded in Water Depth Algorithm (caused by h5py breaking change) (#966) 3.3 (2023-12-01) diff --git a/processing/threedidepth_algorithms.py b/processing/threedidepth_algorithms.py index 6ffa673f..1c8e3136 100644 --- a/processing/threedidepth_algorithms.py +++ b/processing/threedidepth_algorithms.py @@ -128,7 +128,7 @@ def new_file_event(self, file_path): try: with h5py.File(file_path, "r") as results: - timestamps = results["time"].value + timestamps = results["time"][()] self.set_timestamps(timestamps) except Exception as e: logger.exception(e) @@ -179,7 +179,7 @@ def new_file_event(self, file_path): try: with h5py.File(file_path, "r") as results: - timestamps = results["time"].value + timestamps = results["time"][()] self.populate_timestamps(timestamps) except Exception as e: logger.exception(e)