I am using the python wrapper for accessing the data. Using the iterator code provided in the tutorial, I have been able to access the single valued parameters. However, I tried the same code on the parameters present as arrays.
Here is the code
import os
import glob
import sys
sys.path.append("C:\MSD\MSongsDB-master\PythonSrc")
import hdf5_getters
f = open("C:\MSD\data\outsegmentsstart.txt","w")
sys.stdout = f
def get_segments(basedir,ext='.h5') :
for root, dirs, files in os.walk(basedir):
files = glob.glob(os.path.join(root,'*'+ext))
for f in files:
h5 = hdf5_getters.open_h5_file_read(f)
print hdf5_getters.get_segments_start(h5)
h5.close()
get_segments("C:\.." )
And I am getting the following error on the same
NoSuchNodeError Traceback (most recent call last)
<ipython-input-2-54d555847dce> in <module>()
----> 1 get_all_titles("C:\MSD\millionsongsubset_full.tar\millionsongsubset_full\MillionSongSubset")
<ipython-input-1-cd4fc9992a29> in get_all_titles(basedir, ext)
11 for f in files:
12 h5 = hdf5_getters.open_h5_file_read(f)
---> 13 print( hdf5_getters.get_segments_start(h5) )
14 h5.close()
15
C:\MSD\MSongsDB-master\PythonSrc\hdf5_getters.pyc in get_segments_start(h5, songidx)
291 if h5.root.analysis.songs.nrows == songidx + 1:
292 return h5.root.analysis.segments_start[h5.root.analysis.songs.cols.idx_segments_start[songidx]:]
--> 293 return h5.root.analysis.segments_start[h5.root.analysis.songs.cols.idx_segments_start[songidx]:
294 h5.root.analysis.songs.cols.idx_segments_start[songidx+1]]
295
F:\WinPython-64bit-2.7.5.1\python-2.7.5.amd64\lib\site-packages\tables\group.pyc in __getattr__(self, name)
811 self._g_add_children_names()
812 return mydict[name]
--> 813 return self._f_get_child(name)
814
815 def __setattr__(self, name, value):
F:\WinPython-64bit-2.7.5.1\python-2.7.5.amd64\lib\site-packages\tables\group.pyc in _f_get_child(self, childname)
681 self._g_check_open()
682
--> 683 self._g_check_has_child(childname)
684
685 childPath = join_path(self._v_pathname, childname)
F:\WinPython-64bit-2.7.5.1\python-2.7.5.amd64\lib\site-packages\tables\group.pyc in _g_check_has_child(self, name)
405 raise NoSuchNodeError(
406 "group ``%s`` does not have a child named ``%s``"
--> 407 % (self._v_pathname, name))
408 return node_type
409
NoSuchNodeError: group ``/analysis`` does not have a child named ``segments_start``
Any suggestions on how to deal with this?
Thank You!
--