HDFGroup / h5pyd

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

IOError "Bad Request: invalid linkname, '/' not allowed" for create_dataset #9

Closed ahalota closed 7 years ago

ahalota commented 8 years ago

My input dataset does not yet have a group called 2015. I am not able to create a dataset inside of it. In h5py, I was able to do so without first creating the dataset.

fileOut.create_dataset('2015/newdset',data=newdata,compression='gzip')

  File "...\h5pyd\_hl\group.py", line 148, in create_dataset
    self[name] = dset
  File "...\h5pyd\_hl\group.py", line 420, in __setitem__
    self.PUT(req, body=body)
  File "...\h5pyd\_hl\base.py", line 418, in PUT
    raise IOError(rsp.reason)
IOError: Bad Request: invalid linkname, '/' not allowed
ahalota commented 8 years ago

Hm. I checked again after creating the dataset individually first, and am still experiencing this issue. The issue was NOT the nonexistent group, but something else. Below the exact name I used:

c_fore = fileOut.create_dataset("2015/C_FORE",data=FORE_emissions, compression="gzip")

jreadey commented 8 years ago

Ok, that's a bug. As a work-around use the handler of the group you created for the create_dataset call. i.e. 2015_grp.create_dataset(...)

ahalota commented 8 years ago

Works with the workaround.

jreadey commented 7 years ago

This should be fixed with the checkin above.