Em Seg, 2006-01-16 às 16:20 +0100, Godefroid Chapelle escreveu:
> Hi,
> While seaching for objects of all types containing some text through the 
> ZMI find tab, I got the traceback hereunder. (Zope 2.7.8-final on
> windows)
> Traceback (innermost last):
>    [...]
>    Module OFS.Image, line 425, in PrincipiaSearchSource
> AttributeError: content_typestartswith
> I went to the code and found the following :
> [...]
>          if self.content_type.startswith('text/'):
> [...]
> IOW, the traceback is really strange.
> Anybody with a clue ?

I've seen this happen a few times before. In your case, content_type is
probably a standard python function (or method). When an unknown
attribute is looked up in a std python function like that, somehow you
get an AttributeError with the name of the function and the looked up
attribute concatenated, instead of separated by a dot (or more commonly,
instead of the attribute name alone).

Don't know if this is a bad interaction between
ExtensionClass/AttributeError and python, or a python bug.

Cheers, Leo

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to