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.