Re: Pickling errors with tz.FixedOffsetTimezone
"Lawrence Oluyede" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jan 17, 2009 at 11:51 AM, Federico Di Gregorio <fog-NGVKUo/i/[email protected]> wrote: > Il giorno ven, 16/01/2009 alle 13.22 +0100, Lawrence Oluyede ha scritto: >> I have a web application that uses memcached to store some data. >> Some of that data is retrieved through psycopg2 (2.0.8) and contains >> datetime instances. >> >> Sometimes I get the following exception while trying to put objects >> into the memcached cache: >> "PicklingError: Can't pickle <class >> 'psycopg2.tz.FixedOffsetTimezone'>: it's not the same object as >> psycopg2.tz.FixedOffsetTimezone" > > Once I was bitten by a very similar error. The module was loaded two > times from different paths and instances created with the first copy of > the module could not be pickled by the code that had the second copy > available. I didn't dig too much to understand what was happening > because we were in a hurry and simply making sure the was a single copy > of the module solved the problem. Thanks, I'll try to do an in depth check of the program. Maybe there's some dependence that I'm not seeing in the surface triggering this kind of bad behavior. It's odd though. -- Lawrence, http://oluyede.org - http://twitter.com/lawrenceoluyede "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair