Weird Re-Indexing Errors after move to Zope 2.3.1b1
Hi, Since moving one of our servers from Zope 2.2.4 to 2.3.1b1, we've been frequently getting this weird error when trying to do something that requires an object to be re-indexed in the Catalog: Error Type: AttributeError Error Value: 'tuple' object has no attribute 'append' Traceback: Traceback (innermost last): <snip> File /usr/local/zope/cases/Products/aProduct/aProduct.py, line xxx, in index_something (Object: Traversable) File /usr/local/zope/Zope-2.3.1b1-src/lib/python/Products/ZCatalog/ZCatalog.py, line 411, in catalog_object (Object: Traversable) File /usr/local/zope/Zope-2.3.1b1-src/lib/python/Products/ZCatalog/Catalog.py, line 382, in catalogObject File /usr/local/zope/current/lib/python/SearchIndex/UnTextIndex.py, line 394, in index_object File /usr/local/zope/current/lib/python/SearchIndex/UnTextIndex.py, line 305, in insertReverseIndexEntry AttributeError: 'tuple' object has no attribute 'append' Any ideas what's going on here or how to fix it? cheers, Chris
This is an artifact of a problem in the reindexing code that should be gone in the next release. ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: <zope-dev@zope.org> Sent: Thursday, March 01, 2001 12:36 PM Subject: [Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1
Hi,
Since moving one of our servers from Zope 2.2.4 to 2.3.1b1, we've been frequently getting this weird error when trying to do something that requires an object to be re-indexed in the Catalog:
Error Type: AttributeError Error Value: 'tuple' object has no attribute 'append'
Traceback: Traceback (innermost last):
<snip>
File /usr/local/zope/cases/Products/aProduct/aProduct.py, line xxx, in index_something (Object: Traversable) File /usr/local/zope/Zope-2.3.1b1-src/lib/python/Products/ZCatalog/ZCatalog.py, line 411, in catalog_object (Object: Traversable) File /usr/local/zope/Zope-2.3.1b1-src/lib/python/Products/ZCatalog/Catalog.py, line 382, in catalogObject File /usr/local/zope/current/lib/python/SearchIndex/UnTextIndex.py, line 394, in index_object File /usr/local/zope/current/lib/python/SearchIndex/UnTextIndex.py, line 305, in insertReverseIndexEntry AttributeError: 'tuple' object has no attribute 'append'
Any ideas what's going on here or how to fix it?
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )
This is an artifact of a problem in the reindexing code that should be gone in the next release.
Is there a workaround in the meantime? This is turning into a real showstopper for one of NIP's most important projects right now :~( desperately, Chris
No. Sorry. There should be a release of 2.3.1b2 later today. Hint: the problem is caused by attempting to append to a tuple. Converting the tuple to a list beforehand would liekly solve the problem until you can move to a newer release. ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com>; <zope-dev@zope.org> Sent: Thursday, March 01, 2001 2:10 PM Subject: Re: [Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1
This is an artifact of a problem in the reindexing code that should be gone in the next release.
Is there a workaround in the meantime? This is turning into a real showstopper for one of NIP's most important projects right now :~(
desperately,
Chris
Release postponed til at least tomorrow, sorry. ----- Original Message ----- From: "Chris McDonough" <chrism@digicool.com> To: "Chris Withers" <chrisw@nipltd.com>; <zope-dev@zope.org> Sent: Thursday, March 01, 2001 2:31 PM Subject: Re: [Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1
No. Sorry. There should be a release of 2.3.1b2 later today. Hint: the problem is caused by attempting to append to a tuple. Converting the tuple to a list beforehand would liekly solve the problem until you can move to a newer release.
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com>; <zope-dev@zope.org> Sent: Thursday, March 01, 2001 2:10 PM Subject: Re: [Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1
This is an artifact of a problem in the reindexing code that should be gone in the next release.
Is there a workaround in the meantime? This is turning into a real showstopper for one of NIP's most important projects right now :~(
desperately,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Chris Withers wrote:
Is there a workaround in the meantime? This is turning into a real showstopper for one of NIP's most important projects right now :~(
desperately,
Chris I the meantime I have changed that method to the following: def insertReverseIndexEntry(self, entry, documentId): """Insert the correct entry into the reverse indexes for future unindexing.""" newRow = self._unindex.get(documentId, []) if newRow: # Catch cases where we don't need to modify anything if entry in newRow: return 1 if type(newRow) == type([]): newRow.append(entry) elif type(newRow) == type(())): newRow = newRow + (entry,) self._unindex[documentId] = newRow I know it isn't exactly the best fix in the world, but I stops the error _today_ which is what we need. So Until the next version it will do. Cheers -AndyD
Andy Dawkins wrote:
Chris
I the meantime I have changed that method to the following:
def insertReverseIndexEntry(self, entry, documentId): """Insert the correct entry into the reverse indexes for future unindexing."""
newRow = self._unindex.get(documentId, []) if newRow: # Catch cases where we don't need to modify anything if entry in newRow: return 1
if type(newRow) == type([]): newRow.append(entry) elif type(newRow) == type(())): newRow = newRow + (entry,)
self._unindex[documentId] = newRow
People with an extremly keen eye (i.e. No one so far) may have noticed that I have an extra ) on this line:
elif type(newRow) == type(())):
So it should read:
elif type(newRow) == type(()):
Cheers -AndyD
participants (3)
-
Andy Dawkins -
Chris McDonough -
Chris Withers