in the djangoappengine interactive console at
http://localhost:8000/_ah/admin/interactive
I can:
from google.appengine.ext.db import allocate_id_range
from google.appengine.ext.db.metadata import Kind
key = Kind.key_for_kind('some_model_that_doesnt_exist')
print allocate_id_range(key, 154, 154)
This prints a KEY_RANGE_CONTENTION response. Ok fine, if you must.
Works just as well with model/kinds that do exist.
But when I run the same code in my migration task code I get errors
like:
do_move_entities
allocate_id_range(to_key, e_id, e_id)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
ext/db/__init__.py", line 1631, in allocate_id_range
safe_start, _ = datastore.AllocateIds(key, max=end, **kwargs)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/datastore.py", line 1935, in AllocateIds
return AllocateIdsAsync(model_key, size, **kwargs).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_rpc.py", line 1754, in __allocate_ids_hook
self.check_rpc_success(rpc)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
datastore/datastore_rpc.py", line 1182, in check_rpc_success
raise _ToDatastoreError(err)
BadRequestError: illegal group.path.element.type: __kind__
--
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.