Here is the call stack when the error occured:

Exception in request:
Traceback (most recent call last):
  File "/base/data/home/apps/5.349484817187351539/django/core/handlers/
base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/base/data/home/apps/5.349484817187351539/ftb/views.py", line
340, in send_sms_email
    send_sms.load_store()
  File "/base/data/home/apps/5.349484817187351539/sms.py", line 121,
in load_store
    self.recipients()
  File "/base/data/home/apps/5.349484817187351539/sms.py", line 62, in
recipients <---------------------------------------------------
    for recipient in sms_recipients:
  File "/base/data/home/apps/5.349484817187351539/django/db/models/
query.py", line 107, in _result_iter
    self._fill_cache()
  File "/base/data/home/apps/5.349484817187351539/django/db/models/
query.py", line 773, in _fill_cache
    self._result_cache.append(self._iter.next())
  File "/base/data/home/apps/5.349484817187351539/django/db/models/
query.py", line 275, in iterator
    for row in compiler.results_iter():
  File "/base/data/home/apps/5.349484817187351539/djangotoolbox/db/
basecompiler.py", line 218, in results_iter
    for entity in self.build_query(fields).fetch(low_mark, high_mark):
  File "/base/data/home/apps/5.349484817187351539/djangoappengine/db/
compiler.py", line 109, in fetch
    for entity in results:
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_query.py", line 1240, in next
    next_batch = self.__batcher.next()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_query.py", line 1123, in next
    return self.next_batch(1)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_query.py", line 1149, in next_batch
    batch = self.__next_batch.get_result()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/apiproxy_stub_map.py", line 592, in get_result
    return self.__get_result_hook(self)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_query.py", line 1053, in __query_result_hook
    self.__conn.check_rpc_success(rpc)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_rpc.py", line 1048, in check_rpc_success
    raise _ToDatastoreError(err)
BadRequestError: query not found

As you can see the exception occurs when executing the next iteration
of the FOR loop (not in the body).  Also, this problem always occurs
after 100 iterations.  Has anyone come across this error?  There
doesn't seem to be much documentation online.

On Apr 8, 3:24 pm, Raj Arasu <[email protected]> wrote:
> Hello,
>
> I am currently having issues with the error BadRequestError: query not
> found.  I am using the django framework with norel.  Here is the
> context in which the error occurs:
>   1. query for all users -> People.objects.all()
>   2. loop through all these users and perform some action on them
>
> Everything performs as expected up until the loop reaches the 101th
> person. At this point I receive the above mentioned error.  I tested
> this through the remote shell and while it did work, I saw brief
> moments of pause after each 100 people were looped through.  For
> example, there were pauses at 100, 200, 300 and so on. Also, to be
> clear there are only 450 people in this datastore kind.
>
> I not sure if there is a timeout issue, if GAE is querying in 100
> record blocks...
>
> If anyone can offer any insight that would be great.
>
> Thanks,
>
> Raj

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

Reply via email to