[Zope] Zoo guestbook example.

Ignacio Valdes ivaldes@hal-pc.org
Sat, 17 Feb 2001 12:50:23 -0600


Dieter Maurer wrote:

> Ignacio Valdes writes:
>  >              Error Type: AttributeError
>  >              Error Value: 'string' object has no attribute 'objectIds'
>  >     (Info: (('Anonymous', 'test'), {}, None))
>  >   File <string>, line 2, in addEntry
>  > AttributeError: (see above)
>  >
>  > With this code, with guest_name and self as parameters.
>  >
>  > id='entry_%d' % len(self.objectIds())
>  > self.manage_addDTMLDocument(id, title="", file=comments)
>  > doc=getattr(self, id)
>  > doc.manage_addProperty('guest_name', guest_name, 'string')
>
> Apparently, your "self" is a string
> while you expect it to be an object.
>
> Dieter

Okay, how to fix it? I've tried putting either 'self' or 'comments' in the
parameter line as well as various combinations in the code, which results in
either a key error, or the same problem. Wish I could upgrade to 2.2.4 from
2.2.2, but I can't yet. -- IV