My code works fine in normal running zope but not when run as a testcase (I'm not using bin/zopectl test if that matters) I get the following error.
I feel guilty since I've got this line in my code:
transaction.get().commit()  (

I remember having come across this error before but can't remember what the solution was.

Traceback (most recent call last):
File "/home/peterbe/zope/zope285/lib/python/Testing/ZopeTestCase/", line 98, in __call__
  File "", line 81, in test_uploadPhotos
    eids = context.uploadExpenseFiles(files)
File "/home/peterbe/zope/zope285/Products/MExpenses/", line 4458, in uploadExpenseFiles
  File "lib/python/transaction/", line 381, in commit
  File "lib/python/transaction/", line 379, in commit
File "lib/python/transaction/", line 424, in _commitResources File "/home/peterbe/zope/zope285/lib/python/ZODB/", line 462, in commit
File "/home/peterbe/zope/zope285/lib/python/ZODB/", line 503, in _commit
    self._store_objects(ObjectWriter(obj), transaction)
File "/home/peterbe/zope/zope285/lib/python/ZODB/", line 525, in _store_objects
    p = writer.serialize(obj)  # This calls __getstate__ of obj
File "/home/peterbe/zope/zope285/lib/python/ZODB/", line 330, in serialize
    return self._dump(meta, obj.__getstate__())
File "/home/peterbe/zope/zope285/lib/python/ZODB/", line 339, in _dump
  File "", line 69, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle instancemethod objects


Peter Bengtsson,
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to