When running
pd.read_hdf('myfile.h5')
I get the following traceback error:
[[...some longer traceback]]
~/.local/lib/python3.6/site-packages/pandas/io/pytables.py in read_array(self, key, start, stop) 2487 2488 if isinstance(node, tables.VLArray): -> 2489 ret = node[0][start:stop] 2490 else: 2491 dtype = getattr(attrs, 'value_type', None)
~/.local/lib/python3.6/site-packages/tables/vlarray.py in getitem(self, key)
~/.local/lib/python3.6/site-packages/tables/vlarray.py in read(self, start, stop, step)
tables/hdf5extension.pyx in tables.hdf5extension.VLArray._read_array()
ValueError: cannot set WRITEABLE flag to True of this array
No clue what's going on. I've tried reinstalling tables
, pandas
everything basically, but doesn't want to read it.
myfile.h5
with HDFView and see the data? Or, have you tried reading the file with theh5dump
tool? It's a command line utility from the HDF Group. It's another way to see what you have. You can also try thepytables
command line toolptdump
. These may help pinpoint the problem.h5py
, I get the key ['pd']. This has 4 keys:<KeysViewHDF5 ['axis0', 'axis1', 'block0_items', 'block0_values']>
ptdump
dumps the group structure and dataset formats to the command window (or redirect to a text file). If there are no errors, that's a good start. Did you see someVLArrays
listed with data?h5py
is a different method to access HDF5 data. It uses a dictionary like method where the keys are your top level node names and the values are the objects (either a group or a dataset). The goal of this is to verify a validHDF5
file so you can focus on your code.