[Zope-dev] Trouble populating a dictionary of dictionaries

Andy McKay andy@agmweb.ca
Thu, 5 Sep 2002 22:49:50 -0700


> Error Type: TypeError
> Error Value: unsupported operand type(s) for -

>      resource = row['resource'] - 1

You should check that row['resource'] is a data type that supports
subtraction. If for example row['resource'] is a string, this will raise the
error. Try: resource = int(row['resource']) - 1
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca