From: russ <ru...@ag...> - 2005-01-07 08:58:27
|
Hello, I'm working with pytables 0.9.1 on windows 2000 and seem to have discovered a bug somewhere in the works. Essentially I have a table with two columns, "mmid" and "mmidn", and pytables can't read the "mmidn" column. Following is a short program that demonstrates the problem, and following that is the output of the program. The problem seems to be in the naming; changing "mmidn" to "abcd" fixes the problem. Similarly, changing the pair to "abc" and "abcd" recreates the problem. Any help would be appreciated. Thanks, -Russ ru...@ag... -------------------------------------------------------------------------------- import sys,os import tables as hdf class Consolidatedtable(hdf.IsDescription): mmid = hdf.Int32Col(pos=4) mmidn = hdf.Int32Col(pos=5) fname='tmp.h5' print 'pytables version:', hdf.__version__ print 'writing', fname h5 = hdf.openFile(fname, mode='w', title='bwdata') t=h5.createTable('/','q',Consolidatedtable,'data',expectedrows=10000) r=t.row r['mmid']=0 r['mmidn']=0 r.append() h5.close() print 'reading' h5=hdf.openFile(fname) print 'this works:', h5.root.q['mmid'] print 'this does not:', h5.root.q['mmidn'] -------------------------------------------------------------------------------- program output: $ /d/py/test_mmidn.py pytables version: 0.9.1 writing tmp.h5 reading this works: [0] this does not:HDF5-DIAG: Error detected in HDF5 library version: 1.6.3-patch thr ead 0. Back trace follows. #000: D:\hdf5\src\H5Tcompound.c line 327 in H5Tinsert(): unable to insert memb er major(13): Datatype interface minor(45): Unable to insert object #001: D:\hdf5\src\H5Tcompound.c line 418 in H5T_insert(): member overlaps with another member major(13): Datatype interface minor(45): Unable to insert object Traceback (most recent call last): File "d:/util/mypython.py", line 15, in ? execfile(sys.argv[0]) File "d:/py/test_mmidn.py", line 24, in ? print 'this does not:', h5.root.q['mmidn'] File "D:\Python23\lib\site-packages\tables\Table.py", line 778, in __getitem__ return self.read(field=key) File "D:\Python23\lib\site-packages\tables\Table.py", line 592, in read return self._read(start, stop, step, field, coords) File "D:\Python23\lib\site-packages\tables\Table.py", line 731, in _read self._read_field_name(result, start, stop, step, field) File "hdf5Extension.pyx", line 1831, in hdf5Extension.Table._read_field_name RuntimeError: Problems reading table column. |