From: Francesc A. <fa...@ca...> - 2005-06-23 11:24:55
|
Ashley, On Thursday 23 June 2005 04:44, you wrote: > I tested the 20050622 snapshot. Here are few changes I made. > > AttributeSet now preloads all the attributes. I've been pickling > classes in the attributes that may not available when the file is > opened (its a bad design -- I'll change it to use class names one > day), and this raises an exception in AttributeSet.__init__. My > solution was to add ImportError to the "allowable exceptions" in > AttributeSet.__getattr__. I did notice that the documentation for > pickling says that unpickling may raise errors other than > UnpicklingError. > > > --- pytables/tables/AttributeSet.py 2005-06-16 12:43:41.000000000 > +1000 > +++ pytables22/tables/AttributeSet.py 2005-06-23 12:20:33.000000000 > +1000 > @@ -205,7 +205,7 @@ > if type(value) is str and value and value[-1] == ".": > try: > retval = cPickle.loads(value) > - except cPickle.UnpicklingError: > + except (cPickle.UnpicklingError, ImportError): > retval = value > else: > retval = value Yup, you suggestion has been added. Perhaps something like: try: except: would be better? Ivan, do you see something wrong with this? > The other two are just simple mistakes: > > > --- pytables/tables/File.py 2005-06-18 12:36:31.000000000 +1000 > +++ pytables22/tables/File.py 2005-06-23 12:23:16.000000000 +1000 > @@ -912,7 +912,7 @@ > """ > srcObject = self.getNode(where, name=name) > dstObject = self.getNode(dstnode) > - object._v_attrs._f_copy(dstnode) > + srcObject._v_attrs._f_copy(dstnode) > def copyChildren(self, srcgroup, dstgroup, Ops. Solved and added a couple of tests to check File.copyNodeAttrs() just in case. > > --- pytables/tables/Table.py 2005-06-21 13:25:17.000000000 +1000 > +++ pytables22/tables/Table.py 2005-06-23 12:21:52.000000000 +1000 > @@ -1666,9 +1666,9 @@ > index = self._v_file.getNode(indexpathname) > # Get the filters values > self.indexprops.filters = self._g_getFilters() > - description[colname].indexed = 1 > + getattr(description, colname).indexed = 1 > except NodeError: > - description[colname].indexed = 0 > + getattr(description, colname).indexed = 0 > # Add a possible IndexProps property to that > if hasattr(self, "indexprops"): Indeed, you are right. Fixed! > The tests pass with the exception of a segmentation fault that occurs > intermittently. > > The platform is: > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-= > PyTables version: 1.1-beta4 > Extension version: $Id: utilsExtension.pyx 1019 2005-06-20 12:54:50Z > faltet $ > HDF5 version: 1.6.4 > numarray version: 1.4.0 > Zlib version: 1.2.2 > LZO version: 1.08 (Jul 12 2002) > UCL version: 1.03 (Jul 20 2004) > BZIP2 version: 1.0.2 (30-Dec-2001) > Python version: 2.3.5 (#1, Mar 20 2005, 20:38:20) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] > Platform: darwin-Power Macintosh > Byte-ordering: big > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > =-=-=-= > > I get occasional failures with from ``test_earray`` when run inside > ``test_all``:: > > Checking enlargeable array iterator ... Segmentation fault > > Its not a reproducible error. If I run only ``test_earray`` with > ``heavy=1``, it succeeds:: [...] > The crash log is:: > > Exception: EXC_BAD_ACCESS (0x0001) > Codes: KERN_INVALID_ADDRESS (0x0001) at 0x024f8000 > > Thread 0 Crashed: > 0 utilsExtension.so 0x016b4ae4 ucl_nrv2e_decompress_safe_8 > + 684 (n2e_d.c:122) > 1 utilsExtension.so 0x016af480 ucl_deflate + 320 (H5Zucl.c: Mmm, and it is always this UCL call which crash? Perhaps this might a consequence of a bug in UCL for PowerPC platforms, o perhaps (more possible) a bad implementation of UCL support on my part. I've slightly modified the size for buffer compression: can you give it a try so as to see if this symptom has bettered? If problems with UCL compression library remains for PowerPC, I'll have to disable support for it, at least until I get a fix :-/ > Hope this helps. Of course it does! PowerPC was not tested yet for PyTables 1.1. Thanks! -- Francesc |