A Monday 29 November 2010 17:15:34 Francesc Alted escrigué:
> A Monday 29 November 2010 17:07:58 Charles Krohn escrigué:
> > Hello list,
> >
> > I get the following error when trying to create an index:
> >
> > Traceback (most recent call last):
> > File "./index.py", line 6, in <module>
> >
> > f.root.test.cols.col.createCSIndex()
> >
> > File "/usr/local/lib/python2.6/dist-packages/tables/table.py",
> > line
> >
> > 3211, in createCSIndex
> >
> > _blocksizes=_blocksizes, _testmode=_testmode,
> > _verbose=_verbose)
> >
> > File "/usr/local/lib/python2.6/dist-packages/tables/table.py",
> > line
> >
> > 3186, in createIndex
> >
> > tmp_dir, _blocksizes, _verbose)
> >
> > File
> > "/usr/local/lib/python2.6/dist-packages/tables/_table_pro.py",
> >
> > line 331, in _column__createIndex
> >
> > index.optimize(verbose=verbose)
> >
> > File "/usr/local/lib/python2.6/dist-packages/tables/index.py",
> > line
> >
> > 804, in optimize
> >
> > self.do_complete_sort()
> >
> > File "/usr/local/lib/python2.6/dist-packages/tables/index.py",
> > line
> >
> > 870, in do_complete_sort
> >
> > idx = self.search_item_lt(tmp, prev_end, j, ranges[j], stj)
> >
> > File "/usr/local/lib/python2.6/dist-packages/tables/index.py",
> > line
> >
> > 1448, in search_item_lt
> >
> > assert limits[0] < item <= limits[1]
> >
> > AssertionError
> > Closing remaining open files:
> > /home/ctkrohn/Code/pytables/index/pytables-7ZTup2.tmp... done
> > index_test.h5... done
> >
> > This is for createCSIndex(), createIndex() runs just fine. Any
> > thoughts? Did not see anything in the issue tracker. I could
> > provide the example H5 file if necessary (it's just a 5MB file).
> >
> > I'm running PT Pro 2.2.1, built from source. tables.test() runs
> > just fine.
>
> Ugh, you have probably discovered a bug in Pro. Could you send me
> the file by e-mail (or put it in a place where I can retrieve it)?
Thanks for the file. It turns out that the column that you are trying
to index do contain NaN (Not a Number) values, and this is not supported
by Pro. You can force the createCSIndex() to complete by applying the
attached patch, but I doubt that the resulting index would work
correctly, so I strongly discourage its use.
--
Francesc Alted
Index: tables/index.py
===================================================================
--- tables/index.py (revision 4636)
+++ tables/index.py (working copy)
@@ -1448,7 +1448,7 @@
"""Search a single item in a specific sorted slice."""
# This method will only works under the assumtion that item
# *is to be found* in the nslice.
- assert limits[0] < item <= limits[1]
+ # assert limits[0] < item <= limits[1]
cs = self.chunksize
ss = self.slicesize; nelementsLR = self.nelementsILR
bstart = start / cs; cstart = start % cs
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users