Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hsget failing when datasets contain fillvalues #119

Closed
jreadey opened this issue Mar 30, 2022 · 2 comments
Closed

hsget failing when datasets contain fillvalues #119

jreadey opened this issue Mar 30, 2022 · 2 comments
Labels

Comments

@jreadey
Copy link
Member

jreadey commented Mar 30, 2022

If the src dataset has compound dtype and fillvalues, h5py.create_dataset is failing with: "Can't implicitly convert non-string objects to strings" error.

@jreadey
Copy link
Member Author

jreadey commented Dec 2, 2022

See commit above for an update the the aggregate branch - just added back the code to get fillvalue on hsload.
Didn't see the error mentioned above (this is with h5py 3.2.1).
Here's the script I used to create a test file for hsloading/hsgetting:

import h5py
import numpy as np
f = h5py.File("vfill.h5", "w")
dt = np.dtype([('value', 'f4'), ('name', 'S8')])
dset = f.create_dataset('dset', (500,500), chunks = (50,50), dtype=dt, fillvalue=fillvalue)
print("dataset created:", dset)
f.close()

The resulting file was able to round trip to HSDS and back to a file again.

@jreadey
Copy link
Member Author

jreadey commented Dec 8, 2022

Fix is in master and on PiPy - closing.

@jreadey jreadey closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant