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

writing to h5 #59

Open
ramav87 opened this issue May 28, 2021 · 1 comment
Open

writing to h5 #59

ramav87 opened this issue May 28, 2021 · 1 comment

Comments

@ramav87
Copy link
Contributor

ramav87 commented May 28, 2021

writing sidpy dataset objects to NSID h5 files fails. Consider the line

pyNSID.hdf_io.write_nsid_dataset(results, hf['Measurement_000/Channel_000'], main_data_name="new_spectrum");

This results in the following error.


TypeError                                 Traceback (most recent call last)
//anaconda3/lib/python3.7/site-packages/distributed/protocol/pickle.py in dumps(x)
     39     try:
---> 40         result = pickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL)
     41         if len(result) < 1000:

//anaconda3/lib/python3.7/site-packages/h5py/_hl/base.py in __getnewargs__(self)
    371         """
--> 372         raise TypeError("h5py objects cannot be pickled")
    373 

TypeError: h5py objects cannot be pickled
@rajgiriUW
Copy link
Member

I'll need to actually see here (since I don't use nsid much, just usid), but in a separate package of mine that exact h5py error was because of trying to save a class object with h5py references. Meaning I had to delete references to h5_groups from within that Class object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants