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

Richard Ettema richard.ettema@yoursolutions.co.uk
Thu, 7 Jun 2001 12:05:03 +0100


Hi,

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)

the assignment of name2 to name is the problem but I don't understand why.
Can someone point me in the right direction please.

for item in container.get_items():
  if item.name=='':
    item.name = item.name2

Thanks for your help
Richard