[Zope] Python Script problems: attribute-less object (assign or del)

Evan Simpson evan@digicool.com
Thu, 7 Jun 2001 10:54:35 -0400


From: "Richard Ettema" <richard.ettema@yoursolutions.co.uk>
> I am trying to create a python script which gathers info from a sql
database
> using get_items (a ZSQLMethod).  The first thing it needs to do is if
> item.name is empty, give item.name the value of item.name2. I get the
> following error msg when running the complete script, Error
>
> Type: TypeError
> Error Value: attribute-less object (assign or del)

Only simple Python lists and dictionaries can be modified by Scripts.  Class
instances (such as SQL records) may not be written to, unless they conform
to the Restricted Python write API.  Adding this capability to SQL records
would be a good fishbowl project (http://dev.zope.org).

Cheers,

Evan @ digicool