How do I deal with UNpickelableError ?
il nome del dominio =?iso-8859-1?Q?=E8:?= www.badiailvingone.it il resto dei documenti che tin gli ha dato =?iso-8859-1?Q?=E8?= spazzatura. Grazie Ciao Adri P.S. ti faccio sapere se riesce a attivare la cosa pickelable and UNpickelable objects Mime-Version: 1.0 (GMessage framework 0.9.7) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: GyazMail version 0.9.7 Hello all, I get something back froma ZCatalog ( results = myZCatalog({'myAttr': myValue}) ) Then I try to put results in session, like this: ...Request.Session['myResults'] = results What I get back is an UnpickelableError message. It seems that lists are not pickelable. How can I store my results in a pickelable form? Can I? I'd like tu put online my work, when done, so I'd like not using products (like RAM based session managers), since I don't know how many of them are supported by my host. Please, please, please! Is there ANY possibility to put my objects in a pickelable set? Less importantly: How can I know wether an object is pickelable or not? How can I know WHO my object inherits from? In SmallTalk and Java I was used to class browsers and that did. How in Zope/python? Are dictionaries pickelable? How do I distinguish a list from a dictionary? Are there any kind of sets, other than lists and dictionaries? Ok, I think I made clear what I'm at. Please help me Thank you all. Bye Catonano
Catonano wrote at 2002-12-30 19:35 +0100:
... I get something back froma ZCatalog ( results = myZCatalog({'myAttr': myValue}) )
Then I try to put results in session, like this:
...Request.Session['myResults'] = results
What I get back is an UnpickelableError message.
It seems that lists are not pickelable.
How can I store my results in a pickelable form? Can I? You cannot put the result of a catalog search in a session.
But you can store the *list* of "record id"s and later use a catalog method (something like "get_object") to get at the real object. I answered such a question recently in the mailing list. Please search the archive, for details. Dieter
Dieter, On Thu, 2 Jan 2003 20:51:19 +0100, Dieter Maurer wrote:
Catonano wrote at 2002-12-30 19:35 +0100:
... I get something back froma ZCatalog ( results = myZCatalog({'myAttr': myValue}) ) [...]
You cannot put the result of a catalog search in a session.
But you can store the *list* of "record id"s and later use a catalog method (something like "get_object") to get at the real object.
I answered such a question recently in the mailing list. Please search the archive, for details.
really thanks for this tip. I've been struggling with the ZCatalog results because they're brains and not the actual objects, not putting them in session only but also in other tasks. I'm going to search the archive right now. thanks again Bye Catonano
participants (2)
-
Catonano -
Dieter Maurer