From 17c7925b302f481b2adcdacef1f812a0d1509365 Mon Sep 17 00:00:00 2001 From: johannesschabbauer Date: Fri, 3 Feb 2023 14:01:05 +0100 Subject: [PATCH] Fix memory leak in h5py when accessing dataset with composite vlen dtypes. --- labscript_utils/properties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labscript_utils/properties.py b/labscript_utils/properties.py index f0a8ffb..8c2402f 100644 --- a/labscript_utils/properties.py +++ b/labscript_utils/properties.py @@ -124,7 +124,7 @@ def _get_con_table_properties(h5_file, device_name): # Compare with the name in the connection table # whether it is np.bytes_ or vlenstr: - namecol_dtype = dataset['name'].dtype + namecol_dtype = dataset.dtype['name'] if namecol_dtype.type is np.bytes_: device_name = device_name.encode('utf8') elif namecol_dtype is h5py.special_dtype(vlen=str): @@ -143,7 +143,7 @@ def _get_unit_conversion_parameters(h5_file, device_name): # Compare with the name in the connection table # whether it is np.bytes_ or vlenstr: - namecol_dtype = dataset['name'].dtype + namecol_dtype = dataset.dtype['name'] if namecol_dtype.type is np.bytes_: device_name = device_name.encode('utf8') elif namecol_dtype is h5py.special_dtype(vlen=str):