Dear Users,
I am trying to open a .h5 file in jupyter-notebook. Please anyone guide me about reading of HDF files.
*_Command;_*
import h5py filename = "ct_multilevel-err.h5" with h5py.File(filename, "r") as f: # List all groups print("Keys: %s" % f.keys()) a_group_key = list(f.keys())[0]
# Get the data data = list(f[a_group_key])
*_Error;_*
IOError Traceback (most recent call last) <ipython-input-12-769b4593257a> in<module>() 1 filename= "ct_multilevel-err.h5" ----> 2with h5py.File(filename, "r") as f: 3 # List all groups 4 print("Keys: %s" % f.keys()) 5 a_group_key= list(f.keys())[0]
/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc in__init__(self, name, mode, driver, libver, userblock_size, swmr, rdcc_nslots, rdcc_nbytes, rdcc_w0, track_order, **kwds) 406 fid = make_fid(name, mode, userblock_size, 407 fapl, fcpl=make_fcpl(track_order=track_order), --> 408swmr=swmr) 409 410 if isinstance(libver, tuple):
/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc inmake_fid(name, mode, userblock_size, fapl, fcpl, swmr) 171 if swmrand swmr_support: 172 flags|= h5f.ACC_SWMR_READ --> 173fid= h5f.open(name, flags, fapl=fapl) 174 elif mode== 'r+': 175 fid= h5f.open(name, h5f.ACC_RDWR, fapl=fapl)
h5py/_objects.pyx inh5py._objects.with_phil.wrapper()
h5py/_objects.pyx inh5py._objects.with_phil.wrapper()
h5py/h5f.pyx inh5py.h5f.open()
*IOError**: Unable to open file (unable to open file: name = 'ct_multilevel-err.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)*