[Zope] Unpickleable Error
Dieter Maurer
dieter@handshake.de
Mon, 8 Jul 2002 21:09:26 +0200
Arne Krug writes:
> why is it impossible to use HTML Objects in a Zope-Product. The HTML Object
> even inherits from Persistance?!
> I always get this UnPickleable - Error when I try below
Probably, your "globals()" contains something which is not picklable...
> ...
> File C:\Programme\Zope\lib\python\ZODB\Connection.py, line 346, in commit
> (Info: (('App.special_dtml', 'HTML'), '\x00\x00\x00\x00\x00\x00?\x10',
> ''))
> UnpickleableError: (see above)
>
>
> def __init__(self,id):
> self.id = id
>
> self.menuHeader = HTML('<table>',globals())
> self.menuItem = HTML('<tr><td><dtml-var label></td></tr>',globals())
Try:
menuHeader= HTML('<table>', globals())
menuItem= HTML('...', globals())
instead.
Your HTML objects are not instance dependent. So, why saving them
in instance attributes?
Dieter