[google-appengine] Re: memcache, What types can it contain?

2009-03-25 Thread Marzia Niccolai
Hi,

For a higher level answer, you can only store things in memcache that are
pickle-able. The best way to determine if something is pickle-able is to
read the Python docs:
http://docs.python.org/library/pickle.html

-Marzia

On Tue, Mar 24, 2009 at 8:34 PM, Lee Olayvar leeolay...@gmail.com wrote:

 Odd, thanks for the heads up.

 Found out, as part of my bootstrapping process, i was storing the request
 handler in the memcache; a nono it seems. :o

 On Mar 24, 2009 7:22 AM, David Wilson d...@botanicus.net wrote:


 Looks like you're trying to pickle a cStringIO object. That won't work.

 Options are: find the code using cStringIO and convert to using
 StringIO (I'm guessing this will work fine), or consider implementing
 __getstate__ [1] instead.


 David

 [1] http://www.python.org/doc/2.5.2/lib/pickle-inst.html

 2009/3/24 Lee Olayvar leeolay...@gmail.com:

  Can memcache store semi-complex object instances? Or is it basically
 limited  to only simple data...
 --
 It is better to be wrong than to be vague.
  — Freeman Dyson



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: memcache, What types can it contain?

2009-03-24 Thread David Wilson

Looks like you're trying to pickle a cStringIO object. That won't work.

Options are: find the code using cStringIO and convert to using
StringIO (I'm guessing this will work fine), or consider implementing
__getstate__ [1] instead.


David

[1] http://www.python.org/doc/2.5.2/lib/pickle-inst.html

2009/3/24 Lee Olayvar leeolay...@gmail.com:
 Can memcache store semi-complex object instances? Or is it basically limited
 to only simple data structures?

 Because at the moment, i have been unable to store a complex series of class
 instances into memcache. Resulting in an error involving Can't Pickle
 cStringIO.StringI.

 For the full error (mostly): http://dpaste.com/18449/

 Any comments would be appreciated, thanks,
 --
 Lee Olayvar

 




-- 
It is better to be wrong than to be vague.
  — Freeman Dyson

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: memcache, What types can it contain?

2009-03-24 Thread Lee Olayvar
Odd, thanks for the heads up.

Found out, as part of my bootstrapping process, i was storing the request
handler in the memcache; a nono it seems. :o

On Mar 24, 2009 7:22 AM, David Wilson d...@botanicus.net wrote:


Looks like you're trying to pickle a cStringIO object. That won't work.

Options are: find the code using cStringIO and convert to using
StringIO (I'm guessing this will work fine), or consider implementing
__getstate__ [1] instead.


David

[1] http://www.python.org/doc/2.5.2/lib/pickle-inst.html

2009/3/24 Lee Olayvar leeolay...@gmail.com:

 Can memcache store semi-complex object instances? Or is it basically
limited  to only simple data...
--
It is better to be wrong than to be vague.
 — Freeman Dyson


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---