GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Storing an Entity as an indexed property value always fails · Issue #529 · googleapis/google-cloud-python Closed Labels api: datastoreIssues related to the Datastore API. DescriptionFrom the spec:
This means when the Or maybe we should just document that users need to add a property name to To replicate: >>> import os >>> from gcloud import datastore >>> from gcloud.datastore.entity import Entity >>> from gcloud.datastore.key import Key >>> >>> datastore.set_default_connection() >>> dataset_id = os.getenv('GCLOUD_TESTS_DATASET_ID') >>> datastore.set_default_dataset_id(dataset_id) >>> >>> e = Entity(key=Key('Foo', 1)) >>> e2 = Entity(key=Key('Foo', 2)) >>> e['bar'] = e2 >>> e.save() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "gcloud/datastore/entity.py", line 144, in save exclude_from_indexes=self.exclude_from_indexes) File "gcloud/datastore/connection.py", line 495, in save_entity result = self.commit(dataset_id, mutation) File "gcloud/datastore/connection.py", line 376, in commit datastore_pb.CommitResponse) File "gcloud/datastore/connection.py", line 100, in _rpc data=request_pb.SerializeToString()) File "gcloud/datastore/connection.py", line 77, in _request raise six.moves.http_client.HTTPException(message) httplib.HTTPException: Request failed with status code 400. Error was: Entity value is indexed. and notice it doesn't fail if the property is correctly unindexed: >>> e = Entity(key=Key('Foo', 1), exclude_from_indexes=('bar',)) >>> e['bar'] = e2 >>> e.save() >>> e.key.delete() Activity
MetadataMetadataAssigneesLabelsapi: datastoreIssues related to the Datastore API. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |