From: Anthony F. <af...@pr...> - 2009-12-18 19:47:36
|
I'm still trying to track down the errors I had earlier this week, but in the meantime, we've found a bigger one. PyTables crashes when opening a file with an attribute of the root node with the value "0.". It can write attributes like that fine, but when it tries to read there's a crash. I've tracked the problem down to a bug in Python 2.6.4's cPickle module. Until Python fixes the bug (it might be fixed already in 2.7, I don't know), would it make sense to add a parameter to shut off automatic depickling of attributes? Here's a history of my simple test: $ ipython In [1]: import tables In [2]: fyle = tables.openFile("crash_test.h5",mode="a") In [3]: fyle.root._v_attrs Out[3]: /._v_attrs (AttributeSet), 4 attributes: [CLASS := 'GROUP', PYTABLES_FORMAT_VERSION := '2.0', TITLE := '', VERSION := '1.0'] In [4]: fyle.root._v_attrs.trouble = "0." In [5]: fyle.root._v_attrs Out[5]: /._v_attrs (AttributeSet), 5 attributes: [CLASS := 'GROUP', PYTABLES_FORMAT_VERSION := '2.0', TITLE := '', VERSION := '1.0', trouble := '0.'] In [6]: fyle.close() In [7]: Do you really want to exit ([y]/n)? $ ipython In [1]: import tables In [2]: fyle = tables.openFile("crash_test.h5") Segmentation fault (core dumped) $ ipython In [1]: import cPickle In [2]: cPickle.loads("0.") Segmentation fault (core dumped) |