I find no references on what this error means when code exits the with group:
with h5py.File(image_path, driver='core', backing_store=True, mode='w') as h5image:
ds = h5image.create_dataset('Images', shape=(rows,width,height,depth), dtype=str(images[0].dtype))
for cnt, image in enumerate(images):
ds[cnt:cnt+1,:,:] = image
Error Message:
OSError: Can’t write data (no appropriate function for conversion path)
Stack Trace:
h5py\_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py\_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? ..\art\art-repo\venv\Lib\site-packages\h5py\_hl\dataset.py:708: in __setitem__ self.id.write(mspace, fspace, val, mtype, dxpl=self._dxpl) h5py\_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py\_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? h5py\h5d.pyx:222: in h5py.h5d.DatasetID.write ??? h5py\_proxy.pyx:132: in h5py._proxy.dset_rw ???
Appreciate any help that someone could provide on what is wrong.
Environment:
Windows 10 Pro
Python 3.7.3
h5py 3.1.0
numpy 1.19.1
pandas 1.1.1
Examining the C code in HDF5-1_12_0-alpha0 tag which is the last version prior to the Nov 6, 2020 h5py release I found in H5T.c only one instance of message containing “no appropriate function for conversion path” line 4826:
if(!path->conv.u.app_func)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path")
What I do not understand is why it is looking for a function. The data being written is standard image data at 1080x1080x3 of uint8 data.
Thanks