1

I've successfully pickled persistent instances freshly loaded from the DB, but I can't seem to do the same for an instance that I've just created, and is in session.new.

Getting the following error (the python pickle module had the more helpful version of the message):

*** PicklingError: Can't pickle <function <lambda> at 0xb08d3ac>: 
    it's not found as sqlalchemy.ext.associationproxy.<lambda>

If I clear the association_proxy by doing the following:

my_new_obj.my_proxy = []
del my_new_obj.my_proxy

my_new_obj pickles fine.

Any ideas how I can have my association_proxy and eat it too?

1 Answer 1

1

Might have found a solution here:

http://www.sqlalchemy.org/trac/ticket/1446

(solution is to upgrade)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.