[Zope-CMF] 'Products.ZCatalog.ZCatalog' module has no attribute '__bases__'
Dieter Maurer
dieter@handshake.de
Thu, 21 Nov 2002 19:22:19 +0100
Pascal Samuzeau writes:
> I've got this error when I try to add an object. I cna't understand,
> because on my product's definition I have just :
>
> from Products.ZCatalog import ZCatalog
>
> and I use it somewhere as :
>
> test.manage_addProduct['ZCatalog'].manage_addZCatalog('Catalog','Catal
> og')
> test.Catalog.manage_addIndex('test1','FieldIndex')
> test.Catalog.manage_addIndex('test2','TextIndex')
> test.Catalog.manage_addIndex('test3','TextIndex')
> test.Catalog.manage_addIndex('test4','TextIndex')
>
> **********************************************************
> Error Type: AttributeError
> Error Value: 'Products.ZCatalog.ZCatalog' module has no attribute
> '__bases__'
"Products.ZCatalog.ZCatalog" is a module but you use it as a class.
You have:
Products the "Products" package
.ZCatalog the ZCatalog product's package
.ZCatalog the ZCatalog module inside the ZCatalog product
.ZCatalog the ZCatalog class
Thus, you need 3 "ZCatalog" references to read the class.
Dieter