0

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

Gabriel
  • 8,990
  • 6
  • 57
  • 101

1 Answers1

0

Problem solved:

Reinstalled h5py manually by

python3 setup.py configure --hdf5-version=1.8.15
python3 install

Somehow the version did not get set and it used 1.8.4, dont know why...

Gabriel
  • 8,990
  • 6
  • 57
  • 101