[Zope-dev] Trouble adding CatalogAware ZClass in KM|Net News
Kevin Dangoor
kid@kendermedia.com
Wed, 20 Sep 2000 12:26:17 -0400
KM|Net News is having some trouble with Zope 2.2. Specifically, when you
try to add an article, you run into this:
Traceback (innermost last):
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 187, in publish
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Traversable)
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 171, in publish
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: AddArticle)
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: AddArticle)
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/OFS/DTMLMethod.py, line
172, in __call__
(Object: AddArticle)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: AddArticle)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line
146, in render
(Object: REQUEST)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line
146, in render
(Object: _[tsyear])
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line
146, in render
(Object: _[tsmonth])
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: KMArticle_add(_.None, _, NoRedir=1))
(Info: _)
File <string>, line 0, in ?
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/OFS/DTMLMethod.py, line
168, in __call__
(Object: KMArticle_add)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: KMArticle_add)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line
133, in render
(Object: KMArticle.createInObjectManager(REQUEST['id'], REQUEST))
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: KMArticle.createInObjectManager(REQUEST['id'], REQUEST))
(Info: REQUEST)
File <string>, line 0, in ?
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/ZClasses/ZClass.py, line
462, in createInObjectManager
(Object: KMArticle)
File /home/kid/Zope-2.2.2-linux2-x86/lib/python/OFS/ObjectManager.py, line
278, in _setObject
(Object: Traversable)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/Products/ZCatalog/CatalogAwarenes
s.py, line 114, in manage_afterAdd
(Object: CatalogAware)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/Products/ZCatalog/CatalogAwarenes
s.py, line 184, in index_object
(Object: CatalogAware)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/Products/ZCatalog/ZCatalog.py,
line 377, in catalog_object
(Object: Traversable)
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/Products/ZCatalog/Catalog.py,
line 379, in catalogObject
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/SearchIndex/UnTextIndex.py, line
253, in index_object
File
/home/kid/Zope-2.2.2-linux2-x86/lib/python/SearchIndex/UnTextIndex.py, line
196, in getLexicon
AttributeError: None
I glanced through the code in UnTextIndex.py, and at first glance it
looks like self._lexicon is getting set to a Lexicon object... then,
getLexicon(self._lexicon) is called. What's odd is that it seems like
self._lexicon is supposed to be a Lexicon object, but the getLexicon method
thinks it's a string...
Anyone got an idea on this one? The Catalog itself is created
programmatically, but was created without errors. Did anything change with
respect to index initialization between Zope 2.1 and 2.2?
Thanks,
Kevin