How to fix pickling error

582 views
Skip to first unread message

benben

unread,
Nov 12, 2008, 1:48:20 AM11/12/08
to Google App Engine
First ,thanks Marzia Niccolai for his email .

Today ,my app get picklingerror. Lot's of those errors in admin
control panel .
“PicklingError: Can't pickle <type 'instancemethod'>: it's not found
as __builtin__.instancemethod”

This error throw out when set a query object into memcache .

Do not use " Link.all().order('-weight')" to get all the data in Link
table , just use "Link.gql('ORDER BY weight desc').fetch(100)". it
will fix this error .

good luck .

sirdarckcat

unread,
Nov 12, 2008, 8:48:35 AM11/12/08
to Google App Engine
Hi!

Im having the same problem on adding stuff to memcache!

The error log shows it started 10 hours ago, and it hasnt been fixed
since then.

Do you guys think it'll be fixed?

Greetings!!

Marzia Niccolai

unread,
Nov 12, 2008, 12:41:37 PM11/12/08
to google-a...@googlegroups.com
Hi,

What is the error that you are seeing?  And what are you trying to add to Memcache?

Our engineers are looking in to fixing this issue with Memcache, but it's usually not advisable to put a query object in Memcache, one almost always wants to store the results of the query.  If this is not the cause of the issue you are seeing, please let me know.

-Marzia
Message has been deleted

Marzia Niccolai

unread,
Nov 12, 2008, 12:50:41 PM11/12/08
to google-a...@googlegroups.com
If you are seeing this error message in your logs:
PicklingError: Can't pickle <type 'instancemethod'>: it's not found as __builtin__.instancemethod
This indicates that you are storing a query object in Memcache, which is currently causing issues.  The fix that benben suggested will fix this issue.

-Marzia

On Wed, Nov 12, 2008 at 9:45 AM, gg <gameg...@gmail.com> wrote:

Same problem here on:

econe.appspot.com
bwork.appspot.com


On Nov 12, 9:41 am, Marzia Niccolai <ma...@google.com> wrote:
> Hi,
>
> What is the error that you are seeing?  And what are you trying to add to
> Memcache?
>
> Our engineers are looking in to fixing this issue with Memcache, but it's
> usually not advisable to put a query object in Memcache, one almost always
> wants to store the results of the query.  If this is not the cause of the
> issue you are seeing, please let me know.
>
> -Marzia
>
Message has been deleted

Davide Ferrero

unread,
Dec 20, 2008, 11:10:21 AM12/20/08
to Google App Engine
I had some problems while I tried storing in memcache a query object
obtained with the fuction db.GqlQuery(...) and I've solved my issue
with Entity.all() function...
The same problem appears when I try to storing in memcache a python
list that contains several Object that I've created.
I've pybassed the problem but I think that it's good to get you to
know this issue.

Andy Freeman

unread,
Dec 21, 2008, 12:33:40 PM12/21/08
to Google App Engine
Is there an issue on this? (I couldn't find one.) I'll star it if
there is otherwise I'll add one.

I ask because not being able to memcache/pickle query objects is
something of a pain for me. (Caching/pickling query results isn't an
option for my application.)
> > > > > good luck .- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages