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
Gitte Wange wrote at 2004-8-19 10:40 +0200:
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 ... My code looks like this: poster_rotation = req.get('poster_rotation', None) if poster_rotation is not None: self._poster_rotation = int(poster_rotation)
The problem above is definitely not caused by the preceeding code!
... Any hints?
Catch the exception in line 417 of "ZODB.Connection". Log "str(state)" in the "except:" clause and look at the log file. -- Dieter
participants (2)
-
Dieter Maurer -
Gitte Wange