HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
110 stars 39 forks source link

Files with empty datasets cannot be loaded by `hsload --link` #103

Closed loichuder closed 3 years ago

loichuder commented 3 years ago

When trying to load a file with a dataset set to h5py.Empty, I have the following error:

  File ".../h5pyd/h5pyd/_apps/utillib.py", line 661, in object_create_helper
    create_dataset(obj, ctx)
  File ".../h5pyd/h5pyd/_apps/utillib.py", line 334, in create_dataset
    rank = len(dset_dims)
TypeError: object of type 'NoneType' has no len()

May be related to #102

jreadey commented 3 years ago

I think the fix for #102 should resolve this too. Please try it out (in the jreadey-master branch) and let me know if that fixes your load issue.

loichuder commented 3 years ago

It doesn't. This line still fails as shape is None for empty datasets: https://github.com/HDFGroup/h5pyd/blob/jreadey-work/h5pyd/_apps/utillib.py#L347

jreadey commented 3 years ago

Ah ok, I see the problem. Try the latest checkin to jreadey-work please.

loichuder commented 3 years ago

Works fine :ok_hand: !

jreadey commented 3 years ago

This is in master and released to pypi as version 0.8.4.