Hi,

Yes, storing a list of objects will work.  Storing a query object is
generally not something that is guaranteed to work.

-Marzia

On Thu, Feb 12, 2009 at 1:52 AM, Davide Ferrero <davidefe...@gmail.com>wrote:

>
> Until some days ago it worked. But this isn't a problem... I try
> change my code...
> I'll try storing the tag list, which it's a list of object.. Is it
> possible?
>
>
> On 11 Feb, 21:51, Marzia Niccolai <ma...@google.com> wrote:
> > Hi,
> >
> > In this case, you are storing a query in Memcache and not the results of
> the
> > query, and this is the cause of the error.
> >
> > I can't see any reason why you would want to store this query in
> Memcache,
> > you should be fetch()ing some number of results and storing those.
> >
> > -Marzia
> >
> > On Wed, Feb 11, 2009 at 5:39 AM, Davide Ferrero <davidefe...@gmail.com
> >wrote:
> >
> >
> >
> > > The error is on line n.173 that corresponds to a for that scroll a
> > > query object retrieved from memcache or from Entity.all if there isn't
> > > in memcache..
> > > However this is the portion of code:
> >
> > > def tagCloud():
> > >                q1=memcache.get("tagCloud")
> > >                if q1 is None:
> > >                        q1=Tag.all()
> > >                        if not memcache.add("tagCloud",q1):
> > >                                print "Memcache add error on key
> > > \"tagCloud\""
> > >                tags=[]
> > >                for q in q1:
> >
> > > What can I do?
> > > On 9 Feb, 18:30, Marzia Niccolai <ma...@google.com> wrote:
> > > > Hi,
> >
> > > > Can you please post the code to the handler where you are seeing this
> > > issue.
> >
> > > > -Marzia
> >
> > > > On Sun, Feb 8, 2009 at 7:30 AM, Davide Ferrero <
> davidefe...@gmail.com>
> > > wrote:
> >
> > > > > From 2 two days my applications fall in error in every pages. I
> don't
> > > > > have modified nothing from 1 week and three days ago my application
> > > > > works correctly.. this is the error log:
> >
> > > > > #
> > > > >      02-08 07:24AM 44.966 / 500 194ms 139ms-cpu 0kb
> > > > >      See details
> > > > >      79.50.168.248 - - [08/Feb/2009:07:24:45 -0800] "GET /
> HTTP/1.1"
> > > > > 500 104 - -
> > > > >      E 02-08 07:24AM 45.081
> >
> > > > >      'Query' object has no attribute '_Query__query_sets'
> > > > >      Traceback (most recent call last):
> > > > >        File
> "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > > > __init__.py", line 498, in __call__
> > > > >          handler.get(*groups)
> > > > >        File "/base/data/home/apps/sbook/1.331254528912766865/
> > > > > main.py", line 89, in get
> > > > >          tags=Cloud.tagCloud()
> > > > >        File "/base/data/home/apps/sbook/1.331254528912766865/
> > > > > main.py", line 173, in tagCloud
> > > > >          for q in q1:
> > > > >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > > __init__.py", line 1336, in __iter__
> > > > >          return self.run()
> > > > >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > > __init__.py", line 1328, in run
> > > > >          return _QueryIterator(self._model_class,
> iter(self._get_query
> > > > > ().Run()))
> > > > >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > > __init__.py", line 1547, in _get_query
> > > > >          for query_set in self.__query_sets:
> > > > >      AttributeError: 'Query' object has no attribute
> > > > > '_Query__query_sets'
> >
> > > > > Thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to