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

Error when loading h5 files #2

Open
pratibhajagannatha opened this issue May 10, 2022 · 4 comments
Open

Error when loading h5 files #2

pratibhajagannatha opened this issue May 10, 2022 · 4 comments

Comments

@pratibhajagannatha
Copy link

Pandas version: 1.1.5
deepdish version: 0.3.6

Error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in _load_level(handler, level, pathtable)
    478     try:
--> 479         return pathtable[pathname]
    480     except KeyError:

KeyError: '/data'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_49787/142112669.py in <module>
----> 1 example = dd.io.load(os.path.join(base_dir, '{}.h5'.format('BUD13')))

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in load(path, group, sel, unpack)
    654                 name = next(iter(grp._v_children))
    655                 data = _load_specific_level(h5file, grp, name, sel=sel,
--> 656                                             pathtable=pathtable)
    657                 do_unpack = False
    658             elif sel is not None:

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in _load_specific_level(handler, grp, path, sel, pathtable)
    317                 return _load_sliced_level(handler, getattr(grp, vv[0]), sel)
    318             else:
--> 319                 return _load_level(handler, getattr(grp, vv[0]), pathtable)
    320         elif hasattr(grp, '_v_attrs') and vv[0] in grp._v_attrs:
    321             if sel is not None:

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in _load_level(handler, level, pathtable)
    480     except KeyError:
    481         pathtable[pathname] = _load_nonlink_level(handler, node, pathtable,
--> 482                                                   pathname)
    483         return pathtable[pathname]
    484 

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in _load_nonlink_level(handler, level, pathtable, pathname)
    435     elif isinstance(level, tables.VLArray):
    436         if level.shape == (1,):
--> 437             return _load_pickled(level)
    438         else:
    439             return level[:]

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/deepdish/io/hdf5io.py in _load_pickled(level)
    341 
    342 def _load_pickled(level):
--> 343     if isinstance(level[0], ForcePickle):
    344         return level[0].obj
    345     else:

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/tables/vlarray.py in __getitem__(self, key)
    679                 key += self.nrows
    680             (start, stop, step) = self._process_range(key, key + 1, 1)
--> 681             return self.read(start, stop, step)[0]
    682         elif isinstance(key, slice):
    683             start, stop, step = self._process_range(

~/anaconda3/envs/Metadensity/lib/python3.7/site-packages/tables/vlarray.py in read(self, start, stop, step)
    819             listarr = []
    820         else:
--> 821             listarr = self._read_array(start, stop, step)
    822 
    823         atom = self.atom

tables/hdf5extension.pyx in tables.hdf5extension.VLArray._read_array()

ValueError: cannot set WRITEABLE flag to True of this array

@byee4
Copy link
Collaborator

byee4 commented May 11, 2022

Was this in the module or was the package installed in your own environment?

@pratibhajagannatha
Copy link
Author

This was in the module

@byee4
Copy link
Collaborator

byee4 commented May 11, 2022

Slack me the notebook to test?

@byee4
Copy link
Collaborator

byee4 commented May 12, 2022

#1

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