hsload
fails on empty data sets (with a dimension of length 0) #116
Closed
Description
Below is an error we encountered. The error is that hsload fails on data sets that have a dimension of length 0.
(While I'd expect HSDS to be able to handle this, incidentally this error was actually helpful to us! This alerted us to a case where simulation data unexpectedly wasn't produced due to an error in our code.)
Traceback (most recent call last):
File "h5py/h5o.pyx", line 302, in h5py.h5o.cb_obj_simple
File "/home/FCAM/crbmapi/.local/lib/python3.6/site-packages/h5py/_hl/group.py", line 591, in proxy
return func(name, self[name])
File "/usr/local/lib/python3.6/site-packages/h5pyd/_apps/utillib.py", line 674, in object_create_helper
create_dataset(obj, ctx)
File "/usr/local/lib/python3.6/site-packages/h5pyd/_apps/utillib.py", line 459, in create_dataset
fillvalue=fillvalue, scaleoffset=scaleoffset)
File "/usr/local/lib/python3.6/site-packages/h5pyd/_hl/group.py", line 337, in create_dataset
dsid = dataset.make_new_dset(self, shape=shape, dtype=dtype, **kwds)
File "/usr/local/lib/python3.6/site-packages/h5pyd/_hl/dataset.py", line 129, in make_new_dset
raise ValueError(errmsg)
ValueError: Chunk shape must not be greater than data shape in any dimension. (6, 256) is not compatible with (24, 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/hsload", line 33, in
sys.exit(load_entry_point('h5pyd==0.8.4', 'console_scripts', 'hsload')())
File "/usr/local/lib/python3.6/site-packages/h5pyd/_apps/hsload.py", line 314, in main
load_file(fin, fout, verbose=verbose, dataload=dataload, s3path=s3path, compression=compression, compression_opts=compression_opts)
File "/usr/local/lib/python3.6/site-packages/h5pyd/_apps/utillib.py", line 714, in load_file
fin.visititems(object_create_helper)
File "/home/FCAM/crbmapi/.local/lib/python3.6/site-packages/h5py/_hl/group.py", line 592, in visititems
return h5o.visit(self.id, proxy)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper