Unable to create dataset-error
Hi Oriol,
when I tried it again, it didn't work anymore and I got the error below. I got this error for lossless and for zfp. It worked fine when I removed the compression argument from to_netcdf() and I got a copy of the file.
Traceback (most recent call last):
File "/home/muts/pytools/nccompress.py", line 39, in <module>
compress_file(f, compression=args.compression)
File "/home/muts/pytools/nccompress.py", line 18, in compress_file
ds.to_netcdf(destination, encoding=encoding, engine="h5netcdf")
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/core/dataset.py", line 1644, in to_netcdf
return to_netcdf(
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/backends/api.py", line 1111, in to_netcdf
dump_to_store(
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/backends/api.py", line 1158, in dump_to_store
store.store(variables, attrs, check_encoding, writer, unlimited_dims=unlimited_dims)
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/backends/common.py", line 254, in store
self.set_variables(
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/backends/common.py", line 292, in set_variables
target, source = self.prepare_variable(
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/xarray/backends/h5netcdf_.py", line 304, in prepare_variable
nc4_var = self.ds.create_variable(
File "/home/muts/.local/lib/python3.8/site-packages/h5netcdf/core.py", line 791, in create_variable
return group._create_child_variable(
File "/home/muts/.local/lib/python3.8/site-packages/h5netcdf/core.py", line 679, in _create_child_variable
self._h5group.create_dataset(
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/h5py/_hl/group.py", line 148, in create_dataset
dsid = dataset.make_new_dset(group, shape, dtype, data, name, **kwds)
File "/usr/local/apps/python3/3.8.8-01/lib/python3.8/site-packages/h5py/_hl/dataset.py", line 137, in make_new_dset
dset_id = h5d.create(parent.id, name, tid, sid, dcpl=dcpl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5d.pyx", line 87, in h5py.h5d.create
ValueError: Unable to create dataset (error during user callback)