I think I'm trying to remove nodes correctly (thanks again for the help
on the last go-round), but I've encountered what appears to be a
pytables bug in both 1.3.1 and 1.4 alpha from svn. Here's the traceback
and a minimal program to reproduce the error.
$python removeNode_test.py
tables.__version__ 1.4alpha
Traceback (most recent call last):
File "removeNode_test.py", line 19, in ?
h5file.removeNode( h5file.root.distance_table)
File "build/bdist.linux-i686/egg/tables/File.py", line 1027, in removeNode
File "build/bdist.linux-i686/egg/tables/Node.py", line 577, in _f_remove
File "build/bdist.linux-i686/egg/tables/Table.py", line 1761, in _g_remove
File "build/bdist.linux-i686/egg/tables/Node.py", line 546, in _g_remove
File "build/bdist.linux-i686/egg/tables/Table.py", line 1920, in _f_close
File "build/bdist.linux-i686/egg/tables/Table.py", line 1896, in flush
File "build/bdist.linux-i686/egg/tables/Table.py", line 1697, in
flushRowsToIndex
File "build/bdist.linux-i686/egg/tables/Table.py", line 2306, in
_get_dirty
File "build/bdist.linux-i686/egg/tables/Table.py", line 2241, in _getindex
File "build/bdist.linux-i686/egg/tables/File.py", line 898, in _getNode
File "build/bdist.linux-i686/egg/tables/Group.py", line 365, in
_g_loadChild
File "build/bdist.linux-i686/egg/tables/Group.py", line 351, in
_g_checkHasChild
tables.exceptions.NoSuchNodeError: group ``/`` does not have a child
named ``_i_distance_table``
import tables
print 'tables.__version__',tables.__version__
class Distance(tables.IsDescription):
frame = tables.Int32Col(pos=0,indexed=True)
distance = tables.FloatCol(pos=1)
h5file = tables.openFile('test.h5',mode='w')
table =
h5file.createTable(h5file.root,'distance_table',Distance,'distance table')
r = table.row
for i in range(10):
r['frame']=i
r['distance']=float(i**2)
r.append()
table.flush()
h5file.close()
h5file = tables.openFile('test.h5',mode='r+')
h5file.removeNode( h5file.root.distance_table)
h5file.close()
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users