{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/627","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/627/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/627/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/627/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/issues/627","id":57540469,"number":627,"title":"Problem handling local structured property kind without keys","user":{"login":"twumdjin","id":5117014,"avatar_url":"https://avatars.githubusercontent.com/u/5117014?v=3","gravatar_id":"","url":"https://api.github.com/users/twumdjin","html_url":"https://github.com/twumdjin","followers_url":"https://api.github.com/users/twumdjin/followers","following_url":"https://api.github.com/users/twumdjin/following{/other_user}","gists_url":"https://api.github.com/users/twumdjin/gists{/gist_id}","starred_url":"https://api.github.com/users/twumdjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twumdjin/subscriptions","organizations_url":"https://api.github.com/users/twumdjin/orgs","repos_url":"https://api.github.com/users/twumdjin/repos","events_url":"https://api.github.com/users/twumdjin/events{/privacy}","received_events_url":"https://api.github.com/users/twumdjin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels/datastore","name":"datastore","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/milestones/4","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/milestones/4/labels","id":958841,"number":4,"title":"Datastore Stable","description":"Without everything in this list done (and the Alpha and Beta lists), we can't call the API \"stable\".","creator":{"login":"jgeewax","id":112928,"avatar_url":"https://avatars.githubusercontent.com/u/112928?v=3","gravatar_id":"","url":"https://api.github.com/users/jgeewax","html_url":"https://github.com/jgeewax","followers_url":"https://api.github.com/users/jgeewax/followers","following_url":"https://api.github.com/users/jgeewax/following{/other_user}","gists_url":"https://api.github.com/users/jgeewax/gists{/gist_id}","starred_url":"https://api.github.com/users/jgeewax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgeewax/subscriptions","organizations_url":"https://api.github.com/users/jgeewax/orgs","repos_url":"https://api.github.com/users/jgeewax/repos","events_url":"https://api.github.com/users/jgeewax/events{/privacy}","received_events_url":"https://api.github.com/users/jgeewax/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":113,"state":"open","created_at":"2015-01-30T20:34:08Z","updated_at":"2015-02-13T00:14:06Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-02-13T00:11:40Z","updated_at":"2015-02-13T01:38:00Z","closed_at":"2015-02-13T00:14:06Z","body":"According to: https://cloud.google.com/appengine/docs/python/ndb/properties#structured\r\nLocal structured properties do not require keys and AppEngine appears to be fine with this.\r\nUnfortunately, the gcloud-python library expects keys for every entity, even if they're local structured ones.\r\nMy work around is to update my entities in AppEngine to provide dummy keys, however, it would be nice if the library supported it natively.\r\n\r\n```\r\ngcloud/datastore/helpers.pyc in entity_from_protobuf(pb)\r\n     46     :returns: The entity derived from the protobuf.\r\n     47     \"\"\"\r\n---> 48     key = key_from_protobuf(pb.key)\r\n     49     entity_props = {}\r\n     50     exclude_from_indexes = []\r\n\r\ngcloud/datastore/helpers.pyc in key_from_protobuf(pb)\r\n    103         namespace = pb.partition_id.namespace\r\n    104 \r\n--> 105     return Key(*path_args, namespace=namespace, dataset_id=dataset_id)\r\n\r\ngcloud/datastore/key.pyc in __init__(self, *path_args, **kwargs)\r\n     74         # _flat_path, _parent, _namespace and _dataset_id must be set before\r\n     75         # _combine_args() is called.\r\n---> 76         self._path = self._combine_args()\r\n\r\ngcloud/datastore/key.pyc in _combine_args(self)\r\n     131         :raises: :class:`ValueError` if the parent key is not complete.\r\n     132         \"\"\"\r\n--> 133         child_path = self._parse_path(self._flat_path)\r\n\r\ngcloud/datastore/key.pyc in _parse_path(path_args)\r\n      92         \"\"\"\r\n      93         if len(path_args) == 0:\r\n---> 94             raise ValueError('Key path must not be empty.')\r\n \r\nValueError: Key path must not be empty.\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments/74190274","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/issues/627#issuecomment-74190274","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/627","id":74190274,"user":{"login":"jgeewax","id":112928,"avatar_url":"https://avatars.githubusercontent.com/u/112928?v=3","gravatar_id":"","url":"https://api.github.com/users/jgeewax","html_url":"https://github.com/jgeewax","followers_url":"https://api.github.com/users/jgeewax/followers","following_url":"https://api.github.com/users/jgeewax/following{/other_user}","gists_url":"https://api.github.com/users/jgeewax/gists{/gist_id}","starred_url":"https://api.github.com/users/jgeewax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgeewax/subscriptions","organizations_url":"https://api.github.com/users/jgeewax/orgs","repos_url":"https://api.github.com/users/jgeewax/repos","events_url":"https://api.github.com/users/jgeewax/events{/privacy}","received_events_url":"https://api.github.com/users/jgeewax/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T01:38:00Z","updated_at":"2015-02-13T01:38:00Z","body":"Thanks for the feedback @twumdjin (and for the CC @dhermes) !\r\n\r\nOnce we get to a 1.0 release, we'll update the official Google Cloud Platform Python snippets, examples, and documentation to use gcloud-python code (and obviously link to it from the homepage of how to get started in Python by running `pip install gcloud`).\r\n\r\nIf you're interested in the \"1.0\" timeline, we're aiming for the Datastore, Storage, and Core \"Stable\" milestones to be closed out (see https://github.com/GoogleCloudPlatform/gcloud-python/milestones?direction=desc&sort=completeness&state=open)."}}