[Zope-dev] ZCatalog index error

Andy McKay andym@ActiveState.com
Mon, 6 Nov 2000 13:17:35 -0800


Im running into an odd bug with ZCatalog:

I have am running a catalog query and Im getting this message.

  File D:\zope\lib\python\Products\ZCatalog\Lazy.py, line 193, in
__getitem__
  File D:\zope\lib\python\Products\ZCatalog\Catalog.py, line 197, in
__getitem__
KeyError:
52536

This is the line where it seems to be setting all the scores to one, and I
guess it can find the item 52536.

        else:
            # otherwise no score, set all scores to 1
            r=self._v_result_class(self.data[index]).__of__(self.aq_parent)
            r.data_record_id_ = index
            r.data_record_score_ = 1
            r.data_record_normalized_score_ = 1

The thing is my catalog is only 17,000 records in size, I have no item 52536
(no wonder it cant find it). I guess my best plan would be somehow to remove
that the record for that item if I could... hmm...

Any other ideas?

--
  Andy McKay, Developer.
  ActiveState.