Submitted by : 127.0.0.1 at: 2005-09-03T12:36:34+00:00 (12 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

How to reproduce

  • This is on AMD64, Linux, Gentoo
  • Zope Version: (Zope 2.7.7-final, python 2.3.5, linux2)
  • Zwiki: 0.45 (I just tested 0.44 works fine)

Info from control panel:

Python Version
2.3.5 (#1, Sep 2 2005, 14:04:01) [GCC 3.4.4 (Gentoo 3.4.4-r1,
ssp-3.4.4-1.0, pie-8.7.8)]
System Platform
linux2
SOFTWARE_HOME
/usr/lib/zope-2.7.7/lib/python
ZOPE_HOME
/usr/lib/zope-2.7.7
INSTANCE_HOME
/var/lib/zope/zope-bashar
CLIENT_HOME
/var/lib/zope/zope-bashar/var
Network Services
ZServer.HTTPServer.zhttp_server (Port: 9862)
ZServer.FTPServer.FTPServer (Port: 9803)
Process Id
16673 (49156)
Running For
1 min 13 sec

Traceback:

2005-09-03T22:42:43 ERROR(200) Zope Could not import Products.ZWiki
Traceback (most recent call last):
 File "/usr/lib/zope-2.7.7/lib/python/OFS/Application.py", line 673, in import_product
   product=__import__(pname, global_dict, global_dict, silly)
 File "/var/lib/zope/zope-bashar/Products/ZWiki/__init__.py", line 12, in ?
   import ZWikiPage, ZWikiWeb, Permissions, Defaults, OutlineSupport
 File "/var/lib/zope/zope-bashar/Products/ZWiki/ZWikiPage.py", line 86, in ?
   class ZWikiPage(
 File "/var/lib/zope/zope-bashar/Products/ZWiki/ZWikiPage.py", line 124, in ZWikiPage
   __implements__ = CMFAwareness.__implements__
AttributeError: class CMFAwareness has no attribute '__implements__'
Traceback (most recent call last):
 File "/usr/lib/zope-2.7.7/lib/python/Zope/Startup/run.py", line 50, in ?
   run()
 File "/usr/lib/zope-2.7.7/lib/python/Zope/Startup/run.py", line 19, in run
   start_zope(opts.configroot)
 File "/usr/lib/zope-2.7.7/lib/python/Zope/Startup/__init__.py", line 52, in start_zope
   starter.startZope()
 File "/usr/lib/zope-2.7.7/lib/python/Zope/Startup/__init__.py", line 231, in startZope
   Zope.startup()
 File "/usr/lib/zope-2.7.7/lib/python/Zope/__init__.py", line 47, in startup
   _startup()
 File "/usr/lib/zope-2.7.7/lib/python/Zope/App/startup.py", line 45, in startup
   OFS.Application.import_products()
 File "/usr/lib/zope-2.7.7/lib/python/OFS/Application.py", line 650, in import_products
   import_product(product_dir, product_name, raise_exc=debug_mode)
 File "/usr/lib/zope-2.7.7/lib/python/OFS/Application.py", line 673, in import_product
   product=__import__(pname, global_dict, global_dict, silly)
 File "/var/lib/zope/zope-bashar/Products/ZWiki/__init__.py", line 12, in ?
   import ZWikiPage, ZWikiWeb, Permissions, Defaults, OutlineSupport
 File "/var/lib/zope/zope-bashar/Products/ZWiki/ZWikiPage.py", line 86, in ?
   class ZWikiPage(
 File "/var/lib/zope/zope-bashar/Products/ZWiki/ZWikiPage.py", line 124, in ZWikiPage
   __implements__ = CMFAwareness.__implements__
AttributeError: class CMFAwareness has no attribute '__implements__'

property change --simon, Mon, 05 Sep 2005 15:27:33 -0700 reply

Name: '#1149 class CMFAwareness? has no attribute '__implements__'' => '#1149 class CMFAwareness? has no attribute '__implements__' with 0.45' Severity: normal => serious

property change --simon, Mon, 05 Sep 2005 21:24:39 -0700 reply

Name: '#1149 class CMFAwareness? has no attribute '__implements__' with 0.45' => '#1149 class CMFAwareness? has no attribute __implements__ with 0.45' Category: general => admin-installing

property change --simon, Mon, 05 Sep 2005 23:20:51 -0700 reply

Thanks for the report. I saw something like this a few weeks back but can't reproduce it now.

Do you have the __implements__ assignment at CMF.py line 86 ? Is your CMF.pyc newer than CMF.py ?:

class CMFAwareness(PortalContent, ZwikiDublinCoreImpl):
   """
   Mix-in class for CMF support
   """
   __implements__ = ZwikiDublinCoreImpl.__implements__ + \
                    PortalContent.__implements__

... --Tue, 06 Sep 2005 11:42:01 -0700 reply

I'm another gentoo user seeing the same error and yes I see that exact block of text lines 82-87 of CMF.py. I'm trying to run under zope 2.8.1.

I was upgrading to 2.8.1 from 2.7.3, because zwiki 0.45 on 2.7.3 apparently breaks zope horribly (won't start, can't even get to manage/ on the zope server. Pop off zwiki, comes up just fine - nothing obvious in logs as to what's wrong)

... --Tue, 06 Sep 2005 11:46:08 -0700 reply

A downgrade to 0.44 makes both zope 2.7.3 and 2.8.1 functional.

... --Simon Michael, Tue, 06 Sep 2005 15:19:19 -0700 reply

>I was upgrading to 2.8.1 from 2.7.3, because zwiki 0.45 on 2.7.3 apparently breaks zope horribly (won't start, can't even get to manage/ on the zope server. Pop off zwiki, comes up just fine - nothing obvious in logs as to what's wrong) > > Really.. if you have time, could you start 2.7.3 + 0.45 with zopectl fg. I believe this will turn on debug mode and show the traceback.

... --simon, Thu, 08 Sep 2005 12:05:15 -0700 reply

But, that's a separate issue. Back to the original, could anyone help me understand when this happens ? I don't know how to reproduce.

What is happening --Sun, 11 Sep 2005 09:22:32 -0700 reply

In the file CMF.PY, you have encapsulated a try: around everything needed for a CMFAwareness class. When no cmf has been installed (a seperate package?), there is no Products.CMFDefault.DublinCore to import. (Are there others like this?) The exception of the try catches the error and creates a CMFAwareness class that has no __implements__ member. <br><br>Previous releases did not have the __implements__ = CMFAwareness.__implements__ statement in ZWikiPage.py. Now that it is there, we have problems. <br><br>Happy debugging! - Warren

Quick Fix --Mon, 12 Sep 2005 07:34:20 -0700 reply

I've just added the following line after declaration of 'CMFAwareness?' un 'CMF.py' (line 143):

__implements__ = ()

It works nice for me.

doh! --simon, Mon, 12 Sep 2005 16:15:40 -0700 reply

Name: '#1149 class CMFAwareness? has no attribute __implements__ with 0.45' => '#1149 __implements__ attribute error with 0.45 when CMF is not installed'

Of course! It's when CMF is not installed. It's great to get this debugging help, thank you.

I'll check in for 0.46 (send your last name if you want it in the change note).

fixed for 0.46 --simon, Wed, 14 Sep 2005 08:55:36 -0700 reply

Status: open => closed

Is CMF required? --Thu, 15 Sep 2005 11:41:17 -0700 reply

If CMF should be a requirement for installing Zwiki, let us know. In that case, some nice Gentoo user could submit an ebuild bug for the Zwiki ebuild to have CMF added as a dependency.

Is CMF required? --Simon Michael, Thu, 15 Sep 2005 11:55:49 -0700 reply

anonymous wrote:

>If CMF should be a requirement for installing Zwiki, let us know. >

No, CMF is not normally a requirement (see Zwiki and Plone); Zwiki 0.45 broke without it only due to this bug.

repair --simon, Wed, 09 Aug 2006 22:53:53 -0700 reply

Name: '#1149 yoshi' => '#1149 __implements__ AttributeError? with 0.45 when CMF is not installed'