[Zope] ZCatalog: UnKeywordIndex error

Jean Jordaan jean@upfrontsystems.co.za
Wed, 12 Dec 2001 16:18:00 +0200


Hi Chris

> It can be fixed by rebuilding the catalog via "update catalog".

Hmm, sounds wonderful, but I've just done the following:

 - Create new blank ZCatalog

 - Run addIndexes script .. a lot of lines like::

   catalog.manage_addIndex('ComponentVersions', 'KeywordIndex')
   catalog.manage_addIndex('CreatedBy', 'TextIndex')

 - Run catalogEverything script .. a lot of loops like::

   ## ZClass instances
   ids =3D container.Reminders.getReminderIDs()
   for id in ids:
       object =3D container.Reminders[id]
       catalog.catalog_object(object, string.join(object.getPhysicalPath(=
),
'/'))

   ## ZPatterns DataSkins
   ids =3D container.Contacts.Resellers.defaultRack.getPersistentItemIDs(=
)
   for id in ids:
       object =3D container.Contacts.Resellers.defaultRack.getItem(id)
       catalog.catalog_object(object, string.join(object.getPhysicalPath(=
),
'/'))

And directly thereafter::

  2001-12-12T13:51:56 ERROR(200) UnKeywordIndex unindex_object could
  not remove documentId -215648165 from index ComponentVersions.
  This should not happen.
  Traceback (innermost last):
    File SearchIndex/UnIndex.py, line 236, in removeForwardIndexEntry
  KeyError: -215648165

This is when I attempt::

  license_propertysheet =3D license.propertysheets.basic
  license_propertysheet.manage_changeProperties(
      SystemReminders =3D system_reminders)

on the same 'license' instance (ZPatterns DataSkin ZClass) as before.
Entry -215648165 in the Catalog is the right one, indexed properly.

I see that I noticed the UnKeywordIndex errors before:
http://lists.zope.org/pipermail/zope/2001-November/104190.html
but then without a Zope Error being raised.

Currently, I'm seeing::

 Error Type: KeyError
 Error Value: =03AM=BF=F1=DB=8A

 Traceback (innermost last):
  File ZPublisher/Publish.py, line 223, in publish_module
  File ZPublisher/Publish.py, line 187, in publish
  File Zope/__init__.py, line 221, in zpublisher_exception_hook
    (Object: ProviderContainer)
  File ZPublisher/Publish.py, line 175, in publish
  File Zope/__init__.py, line 235, in commit
  File ZODB/Transaction.py, line 300, in commit
  File ZODB/Connection.py, line 377, in commit
    (Info: (('BTrees.Length', 'Length'), '\000\000\000\000\000\002D\367',
''))
  File ZODB/FileStorage.py, line 667, in store
    (Object: /home/httpd/zope-instances/dev-creme/var/Data.fs)
  File ZODB/ConflictResolution.py, line 174, in tryToResolveConflict
    (Object: /home/httpd/zope-instances/dev-creme/var/Data.fs)
  File ZODB/ConflictResolution.py, line 104, in state
    (Object: /home/httpd/zope-instances/dev-creme/var/Data.fs)
  File ZODB/FileStorage.py, line 612, in loadSerial
    (Object: /home/httpd/zope-instances/dev-creme/var/Data.fs)
 KeyError: (see above)

This one is actually the showstopper.

Jean