Re: [Zope-dev] ZCatalog index error
Andy McKay wrote: > > http://zope.nipltd.com/public/lists/dev-archive.nsf/0a8715d5f3c7b6a3802568c1 > 006328f7/c15eb30d0faf1057802568b8002e1273?OpenDocument AKA: http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/C15EB30D0FAF1057 (which almost fits on a line ;-) > to > > else: > self.counter = self.counter + 1 > self._lexicon[intern(word)] = self.counter > return self.counter > > The message also says this was fixed in CVS. I wonder what happened to it? cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
Ah ok. I'll just wait impatiently then. Thanks. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]>; "Christopher Petrilli" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 09, 2000 12:03 PM Subject: Re: [Zope-dev] ZCatalog index error > I have no idea about this, but I know that this isn't all you need > > - Original Message - > From: "Andy McKay" <[EMAIL PROTECTED]> > To: "Andy McKay" <[EMAIL PROTECTED]>; "Christopher Petrilli" > <[EMAIL PROTECTED]>; "Chris McDonough" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Thursday, November 09, 2000 2:31 PM > Subject: Re: [Zope-dev] ZCatalog index error > > > > I found this in the archive. Is this the patch I need or is it more > complex, > > it seems strange that it hasnt been implemented... > > > > > http://zope.nipltd.com/public/lists/dev-archive.nsf/0a8715d5f3c7b6a3802568c1 > > 006328f7/c15eb30d0faf1057802568b8002e1273?OpenDocument > > > > [..] > > > > In lib/python/SearchIndex/Lexicon.py the set method of the Lexicon > > class, change: > > > > else: > > self._lexicon[intern(word)] = self.counter > > self.counter = self.counter + 1 > > return self.counter > > > > to > > > > else: > > self.counter = self.counter + 1 > > self._lexicon[intern(word)] = self.counter > > return self.counter > > > > > > > > -- > > Andy McKay, Developer. > > ActiveState. > > - Original Message - > > From: "Andy McKay" <[EMAIL PROTECTED]> > > To: "Christopher Petrilli" <[EMAIL PROTECTED]>; "Chris McDonough" > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Tuesday, November 07, 2000 12:02 PM > > Subject: Re: [Zope-dev] ZCatalog index error > > > > > > > Ah sorry, I have custom CatalogAware class thats been a bit hacked but > was > > > written by Mike Pelletier... when he was hanging around at ActiveState > for > > a > > > few days. Theres a link to wiki on it somewhere > > > > > > -- > > > Andy McKay, Developer. > > > ActiveState. > > > > > > - Original Message - > > > From: "Christopher Petrilli" <[EMAIL PROTECTED]> > > > To: "Andy McKay" <[EMAIL PROTECTED]>; "Chris McDonough" > > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > > Sent: Tuesday, November 07, 2000 10:13 AM > > > Subject: Re: [Zope-dev] ZCatalog index error > > > > > > > > > > > > > > > Well im not sure how much deleting the index and then recreating the > > > index > > > > > throught the management interface actually does. But I wrote an > > external > > > > > method to basically do a find and apply to recatalog bunches of > > objects. > > > > > > > > Actually i meant originally, not the second time. Are you using > > > > CatalogAware to get objects to automatically index themselves? What > > > exactly > > > > are you doing to get them in the Catalog in the first place? > > > > > > > > Chris > > > > > > > > > > > > > ___ > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > http://lists.zope.org/mailman/listinfo/zope-dev > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
I have no idea about this, but I know that this isn't all you need - Original Message - From: "Andy McKay" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]>; "Christopher Petrilli" <[EMAIL PROTECTED]>; "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 09, 2000 2:31 PM Subject: Re: [Zope-dev] ZCatalog index error > I found this in the archive. Is this the patch I need or is it more complex, > it seems strange that it hasnt been implemented... > > http://zope.nipltd.com/public/lists/dev-archive.nsf/0a8715d5f3c7b6a3802568c1 > 006328f7/c15eb30d0faf1057802568b8002e1273?OpenDocument > > [..] > > In lib/python/SearchIndex/Lexicon.py the set method of the Lexicon > class, change: > > else: > self._lexicon[intern(word)] = self.counter > self.counter = self.counter + 1 > return self.counter > > to > > else: > self.counter = self.counter + 1 > self._lexicon[intern(word)] = self.counter > return self.counter > > > > -- > Andy McKay, Developer. > ActiveState. > - Original Message - > From: "Andy McKay" <[EMAIL PROTECTED]> > To: "Christopher Petrilli" <[EMAIL PROTECTED]>; "Chris McDonough" > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, November 07, 2000 12:02 PM > Subject: Re: [Zope-dev] ZCatalog index error > > > > Ah sorry, I have custom CatalogAware class thats been a bit hacked but was > > written by Mike Pelletier... when he was hanging around at ActiveState for > a > > few days. Theres a link to wiki on it somewhere > > > > -- > > Andy McKay, Developer. > > ActiveState. > > > > - Original Message - > > From: "Christopher Petrilli" <[EMAIL PROTECTED]> > > To: "Andy McKay" <[EMAIL PROTECTED]>; "Chris McDonough" > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Tuesday, November 07, 2000 10:13 AM > > Subject: Re: [Zope-dev] ZCatalog index error > > > > > > > > > > > Well im not sure how much deleting the index and then recreating the > > index > > > > throught the management interface actually does. But I wrote an > external > > > > method to basically do a find and apply to recatalog bunches of > objects. > > > > > > Actually i meant originally, not the second time. Are you using > > > CatalogAware to get objects to automatically index themselves? What > > exactly > > > are you doing to get them in the Catalog in the first place? > > > > > > Chris > > > > > > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
I found this in the archive. Is this the patch I need or is it more complex, it seems strange that it hasnt been implemented... http://zope.nipltd.com/public/lists/dev-archive.nsf/0a8715d5f3c7b6a3802568c1 006328f7/c15eb30d0faf1057802568b8002e1273?OpenDocument [..] In lib/python/SearchIndex/Lexicon.py the set method of the Lexicon class, change: else: self._lexicon[intern(word)] = self.counter self.counter = self.counter + 1 return self.counter to else: self.counter = self.counter + 1 self._lexicon[intern(word)] = self.counter return self.counter -- Andy McKay, Developer. ActiveState. - Original Message - From: "Andy McKay" <[EMAIL PROTECTED]> To: "Christopher Petrilli" <[EMAIL PROTECTED]>; "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 07, 2000 12:02 PM Subject: Re: [Zope-dev] ZCatalog index error > Ah sorry, I have custom CatalogAware class thats been a bit hacked but was > written by Mike Pelletier... when he was hanging around at ActiveState for a > few days. Theres a link to wiki on it somewhere > > -- > Andy McKay, Developer. > ActiveState. > > - Original Message - > From: "Christopher Petrilli" <[EMAIL PROTECTED]> > To: "Andy McKay" <[EMAIL PROTECTED]>; "Chris McDonough" > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, November 07, 2000 10:13 AM > Subject: Re: [Zope-dev] ZCatalog index error > > > > > > > Well im not sure how much deleting the index and then recreating the > index > > > throught the management interface actually does. But I wrote an external > > > method to basically do a find and apply to recatalog bunches of objects. > > > > Actually i meant originally, not the second time. Are you using > > CatalogAware to get objects to automatically index themselves? What > exactly > > are you doing to get them in the Catalog in the first place? > > > > Chris > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
Ah sorry, I have custom CatalogAware class thats been a bit hacked but was written by Mike Pelletier... when he was hanging around at ActiveState for a few days. Theres a link to wiki on it somewhere -- Andy McKay, Developer. ActiveState. - Original Message - From: "Christopher Petrilli" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]>; "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 07, 2000 10:13 AM Subject: Re: [Zope-dev] ZCatalog index error > > > Well im not sure how much deleting the index and then recreating the index > > throught the management interface actually does. But I wrote an external > > method to basically do a find and apply to recatalog bunches of objects. > > Actually i meant originally, not the second time. Are you using > CatalogAware to get objects to automatically index themselves? What exactly > are you doing to get them in the Catalog in the first place? > > Chris > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
> Well im not sure how much deleting the index and then recreating the index > throught the management interface actually does. But I wrote an external > method to basically do a find and apply to recatalog bunches of objects. Actually i meant originally, not the second time. Are you using CatalogAware to get objects to automatically index themselves? What exactly are you doing to get them in the Catalog in the first place? Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
Well im not sure how much deleting the index and then recreating the index throught the management interface actually does. But I wrote an external method to basically do a find and apply to recatalog bunches of objects. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Christopher Petrilli" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]>; "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 07, 2000 7:27 AM Subject: Re: [Zope-dev] ZCatalog index error > How are you getting things indexed and reindexed in the Catalog, if I might > ask? > > Chris > - Original Message - > From: "Andy McKay" <[EMAIL PROTECTED]> > To: "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Monday, November 06, 2000 6:42 PM > Subject: Re: [Zope-dev] ZCatalog index error > > > > Thanks, will look forward to 2.2.3! > > > > I deleted an index and metadata, re created them and recatalogued the > > affected objects. That seem to solve it in my initial tests... keeping my > > fingers crossed. > > > > -- > > Andy McKay, Developer. > > ActiveState. > > > > - Original Message - > > From: "Chris McDonough" <[EMAIL PROTECTED]> > > To: "Andy McKay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Monday, November 06, 2000 3:49 PM > > Subject: Re: [Zope-dev] ZCatalog index error > > > > > > > Andy, > > > > > > This is a known issue with the catalog (searching the collector for "key > > > error" will show you how common it has been). Chris Petrilli should be > > > checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow > > > that resolves it. The problem is evidently related to the way > > > catalog.index_object() and catalog.unindex_object() do their thing. I'd > > > advise you live with the issue until 2.2.3 comes out (which should be > > > sometime this week, AFAIK). > > > > > > - Original Message - > > > From: "Andy McKay" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, November 06, 2000 4:17 PM > > > Subject: [Zope-dev] ZCatalog index error > > > > > > > > > > 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. > > > > > > > > > > > > ___ > > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > > http://lists.zope.org/mailman/listinfo/zope-dev > > > > ** No cross posts or HTML encoding! ** > > > > (Related lists - > > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > > > > > > > > > > > ___ > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > http://lists.zope.org/mailman/listinfo/zope-dev > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
How are you getting things indexed and reindexed in the Catalog, if I might ask? Chris - Original Message - From: "Andy McKay" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 06, 2000 6:42 PM Subject: Re: [Zope-dev] ZCatalog index error > Thanks, will look forward to 2.2.3! > > I deleted an index and metadata, re created them and recatalogued the > affected objects. That seem to solve it in my initial tests... keeping my > fingers crossed. > > -- > Andy McKay, Developer. > ActiveState. > > - Original Message - > From: "Chris McDonough" <[EMAIL PROTECTED]> > To: "Andy McKay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Monday, November 06, 2000 3:49 PM > Subject: Re: [Zope-dev] ZCatalog index error > > > > Andy, > > > > This is a known issue with the catalog (searching the collector for "key > > error" will show you how common it has been). Chris Petrilli should be > > checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow > > that resolves it. The problem is evidently related to the way > > catalog.index_object() and catalog.unindex_object() do their thing. I'd > > advise you live with the issue until 2.2.3 comes out (which should be > > sometime this week, AFAIK). > > > > - Original Message - > > From: "Andy McKay" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, November 06, 2000 4:17 PM > > Subject: [Zope-dev] ZCatalog index error > > > > > > > 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. > > > > > > > > > ___ > > > Zope-Dev maillist - [EMAIL PROTECTED] > > > http://lists.zope.org/mailman/listinfo/zope-dev > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > > > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
> I deleted an index and metadata, re created them and recatalogued the > affected objects. That seem to solve it in my initial tests... keeping my > fingers crossed. This indeed solves it (until you later run index_object() on an object without first running unindex_object() on its catalog representation). But don't sweat that :-). Just wait for 2.2.3. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
Thanks, will look forward to 2.2.3! I deleted an index and metadata, re created them and recatalogued the affected objects. That seem to solve it in my initial tests... keeping my fingers crossed. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 06, 2000 3:49 PM Subject: Re: [Zope-dev] ZCatalog index error > Andy, > > This is a known issue with the catalog (searching the collector for "key > error" will show you how common it has been). Chris Petrilli should be > checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow > that resolves it. The problem is evidently related to the way > catalog.index_object() and catalog.unindex_object() do their thing. I'd > advise you live with the issue until 2.2.3 comes out (which should be > sometime this week, AFAIK). > > - Original Message - > From: "Andy McKay" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, November 06, 2000 4:17 PM > Subject: [Zope-dev] ZCatalog index error > > > > 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. > > > > > > ___ > > Zope-Dev maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope-dev > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope ) > > > > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog index error
Andy, This is a known issue with the catalog (searching the collector for "key error" will show you how common it has been). Chris Petrilli should be checking in some changes to the CVS 2.2 branch (and the trunk?) tomorrow that resolves it. The problem is evidently related to the way catalog.index_object() and catalog.unindex_object() do their thing. I'd advise you live with the issue until 2.2.3 comes out (which should be sometime this week, AFAIK). - Original Message - From: "Andy McKay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 06, 2000 4:17 PM Subject: [Zope-dev] ZCatalog index error > 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. > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCatalog index error
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. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )