AttributeError Question

Fredrik Lundh fredrik at pythonware.com
Mon Sep 25 09:47:19 EDT 2006


"Javier Subervi" <javier_subervi at yahoo.com> wrote:

> This came up when trying to load a Zope product:
>
>    * Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
>      __traceback_info__: field.Vocabulary(here)
>    * Module Python expression "field.Vocabulary(here)", line 1, in <expression>
>    * Module Products.Archetypes.Field, line 432, in Vocabulary
>    * Module Products.Archetypes.utils, line 145, in mapply
>    * Module Products.EasyDocument.content.EasyDocument, line 112, in _list_templates
>    * Module OFS.Traversable, line 161, in unrestrictedTraverse
>      __traceback_info__: ([], 'EasyDocumentTemplates')
>    * Module Products.Archetypes.BaseObject, line 1072, in __bobo_traverse__
>
> AttributeError: EasyDocumentTemplates
>
> Can you tell me what I should do with Attribute Errors in general? The docs say an
> AttributeError is "Raised when an attribute reference or assignment fails." Okay, fine...
> where do I go from here?

in general, you get an AttributeError if you try to execute e.g. obj.foo where "obj" is an
object but the "foo" attribute doesn't exist.  in your case, the AttributeError seems to be
occurring deep down inside Zope, which makes it a bit hard to figure out exactly what
you been doing wrong (if anything).  It could be a bug in your code, or a bug in Zope,
or a bug in some module you're using.

it's probably best to post this to a Zope-specific mailing list.

</F> 






More information about the Python-list mailing list