Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt thomasaarholt/ioerror.py
Last active May 4, 2016

Embed
What would you like to do?
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-14-240ac4daefae> in <module>()
1 spectra[0].save("test2.hdf5")
----> 2 abc = hs.load("test2.hdf5")
/Users/thomas/Dropbox/0_Git/GitHub Desktop/hyperspy/hyperspy/io.py in load(filenames, record_by, signal_type, signal_origin, stack, stack_axis, new_axis_name, mmap, mmap_dir, **kwds)
212 objects = [load_single_file(filename,
213 **kwds)
--> 214 for filename in filenames]
215
216 if hyperspy.defaults_parser.preferences.Plot.plot_on_load:
/Users/thomas/Dropbox/0_Git/GitHub Desktop/hyperspy/hyperspy/io.py in <listcomp>(.0)
212 objects = [load_single_file(filename,
213 **kwds)
--> 214 for filename in filenames]
215
216 if hyperspy.defaults_parser.preferences.Plot.plot_on_load:
/Users/thomas/Dropbox/0_Git/GitHub Desktop/hyperspy/hyperspy/io.py in load_single_file(filename, record_by, signal_type, signal_origin, **kwds)
266 signal_type=signal_type,
267 signal_origin=signal_origin,
--> 268 **kwds)
269
270
/Users/thomas/Dropbox/0_Git/GitHub Desktop/hyperspy/hyperspy/io.py in load_with_reader(filename, reader, record_by, signal_type, signal_origin, **kwds)
277 file_data_list = reader.file_reader(filename,
278 record_by=record_by,
--> 279 **kwds)
280 objects = []
281
/Users/thomas/Dropbox/0_Git/GitHub Desktop/hyperspy/hyperspy/io_plugins/hdf5.py in file_reader(filename, record_by, mode, driver, backing_store, load_to_memory, **kwds)
164 exp_dict_list.extend(standalone_models)
165 if not len(exp_dict_list):
--> 166 raise IOError('This is not a valid HyperSpy HDF5 file. '
167 'You can still load the data using a hdf5 reader, '
168 'e.g. h5py, and manually create a Signal. '
OSError: This is not a valid HyperSpy HDF5 file. You can still load the data using a hdf5 reader, e.g. h5py, and manually create a Signal. Please, refer to the User Guide for details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.