When I open an h5 file file.h5
with h5py and check for a certain key:
then this does not work:
found = "data" in h5File.keys() # warning on this line
if found:
a = h5File["data"][...]
and spits out the following warning:
HDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:
#000: /cluster/home/nuetzig/installHDF5/hdf5-1.8.15-patch1/src/H5Gdeprec.c line 893 in H5Gget_objinfo(): not a location
major: Invalid arguments to routine
minor: Inappropriate type
#001: /cluster/home/nuetzig/installHDF5/hdf5-1.8.15-patch1/src/H5Gloc.c line 173 in H5G_loc(): invalid file ID
major: Invalid arguments to routine
minor: Bad value
However making a set from h5File.keys()
which is of type KeysViewWithLock(<HDF5 file "file.h5" (mode r)>)
works:
found = "data" in set(h5File.keys())
if found:
a = h5File["data"][...]
Anybody some idea where the problem is?
I have to say, that the file resides on a parallel network storage (Lustre) on a cluster...
Note: also "data" in h5File
does not work