Am Montag, 2. Juni 2008 20:04 schrieb Hermann Himmelbauer:
> Hi,
> In my zope3 tests, I set up some basic test data. After that, I'm calling
> transaction.commit(). However, I get the following traceback:
>
>
> --------------- snip -------------------
>   File "copy_reg.py", line 69, in _reduce_ex
>     raise TypeError, "can't pickle %s objects" % base.__name__
> TypeError: can't pickle module objects
> ------------------ snip -------------------

I found it by myself: I registered a zope.sqlalchemy related utility, which 
stores an engine (self.engine = create_engine(DSN,...)) and a scoped session 
(self.Session = scoped_session(sessionmaker...)). These two objects cannot be 
serialized, hence the above problem.

Now I'm unsure what to do about this problem - is there any code available 
that demonstrates how to register SA engines/Sessions as utilities?

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to