From 22d6684bab8bd0389159de929e267127b5a88f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wollschl=C3=A4ger?= Date: Tue, 19 Jul 2022 14:29:58 +0200 Subject: [PATCH] fixed issue with Dataset fixes the issue ```AttributeError: 'Dataset' object has no attribute 'value'``` As described in this SO thread: https://stackoverflow.com/questions/67409919/attributeerror-dataset-object-has-no-attribute-value this will occur for h5py > 2.9.0. Current version is 3.7.0! --- readers/lib/pyanitools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readers/lib/pyanitools.py b/readers/lib/pyanitools.py index f511050..a8f16f2 100644 --- a/readers/lib/pyanitools.py +++ b/readers/lib/pyanitools.py @@ -56,7 +56,7 @@ def h5py_dataset_iterator(self,g, prefix=''): data = {'path':path} for k in keys: if not isinstance(item[k], h5py.Group): - dataset = np.array(item[k].value) + dataset = np.array(item[k])[()] if type(dataset) is np.ndarray: if dataset.size != 0: @@ -92,7 +92,7 @@ def get_data(self, path, prefix=''): # print(path) for k in keys: if not isinstance(item[k], h5py.Group): - dataset = np.array(item[k].value) + dataset = np.array(item[k])[()] if type(dataset) is np.ndarray: if dataset.size != 0: