[Zope] Can't pickle function objects error

Gitte Wange gitte at mmmanager.org
Thu Aug 19 04:40:56 EDT 2004


Hello,

I have tried and google for an answer to this but without any luck.
I have added an attribute to a class which saves an integer and the 
above error is raised:

Traceback (innermost last):

    * Module ZPublisher.Publish, line 104, in publish
    * Module Zope.App.startup, line 221, in commit
    * Module ZODB.Transaction, line 233, in commit
    * Module ZODB.Transaction, line 348, in _commit_objects
    * Module ZODB.Connection, line 417, in commit
      __traceback_info__: (('Products.MyMediaManager.MediaEvent', 
'MediaEvent'), '\x00\x00\x00\x00\x00\x00\x1a\x92', '')
    * Module copy_reg, line 69, in _reduce_ex

TypeError: can't pickle function objects

(It didn't happen before I added this attribute so I'm quite sure that 
is the reason for the error).

My code looks like this:
poster_rotation = req.get('poster_rotation', None)
        if poster_rotation is not None:
            self._poster_rotation = int(poster_rotation)

I'm running Zope-2.7, Python-2.3.3 and Plone-2.0.3
Any hints?

Greetings,
Gitte Wange


More information about the Zope mailing list