[sqlalchemy] Python Pickle Error - Can't pickle class 'sqlalchemy.orm.session.Session'

2009-12-18 Thread Lynton Grice
Hi there, I am writing a little persistant Queue class/s using sqlalchemy and sqlite. All is going fine with the development but now I have reached the stage where I would like to have each request spawned as a new process (from Python's muliprocessing module). The error I am getting is: Can't

Re: [sqlalchemy] Python Pickle Error - Can't pickle class 'sqlalchemy.orm.session.Session'

2009-12-18 Thread Antoine Pitrou
Does anyone have any idea how I can get around this Pickling error? Different ways to make your class picklable are described here: http://docs.python.org/library/pickle.html#pickling-and-unpickling-normal-class-instances You could for example write __getstate__ and __setstate__ methods such

Re: [sqlalchemy] Python Pickle Error - Can't pickle class 'sqlalchemy.orm.session.Session'

2009-12-18 Thread Michael Bayer
Lynton Grice wrote: Hi there, I am writing a little persistant Queue class/s using sqlalchemy and sqlite. All is going fine with the development but now I have reached the stage where I would like to have each request spawned as a new process (from Python's muliprocessing module). The