On 8/17/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> its a pickling error.  Pickle is not managing to map your pickled data
> back to the correct module name from which to import the "Path"
> object.    If this module (i.e., where the Path class originates) is
> run by django in some kind of "dynamic importing" scheme, that could
> definitely break pickle's ability to locate the originating module,
> depending on how its done.


The 'Path' object is not related to django


You might want to try using the "pickle" module instead of the default
> of cPickle, which ive observed is not as smart about module imports:
>
> import pickle
> Column('ls', PickleType(pickler=pickle), nullable=False)


the same


alternatively, define all the classes which you are pickling, i.e.
> Path etc., in a separate module which is defined in a traditional
> location thats importable by Python's own "import" statement.


I've tried this :

 import psycopg2
...
s = curs.fetchone()[0]
ls = cPickle.loads(str(s))

and it returned :
AttributeError: 'module' object has no attribute 'Path'

just as django did. it pretends that 'Path' is not defined. Seems it is
still the problem of django

Thanks.

P.S. going to use cPickle without sqlalchemy to load data

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to