{"action":"opened","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2744","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2744/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2744/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2744/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2744","id":189854061,"number":2744,"title":"datastore emulator Unknown request URIs","user":{"login":"mattwarrenrnp","id":5222520,"avatar_url":"https://avatars.githubusercontent.com/u/5222520?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwarrenrnp","html_url":"https://github.com/mattwarrenrnp","followers_url":"https://api.github.com/users/mattwarrenrnp/followers","following_url":"https://api.github.com/users/mattwarrenrnp/following{/other_user}","gists_url":"https://api.github.com/users/mattwarrenrnp/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwarrenrnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwarrenrnp/subscriptions","organizations_url":"https://api.github.com/users/mattwarrenrnp/orgs","repos_url":"https://api.github.com/users/mattwarrenrnp/repos","events_url":"https://api.github.com/users/mattwarrenrnp/events{/privacy}","received_events_url":"https://api.github.com/users/mattwarrenrnp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-16T21:38:10Z","updated_at":"2016-11-16T21:38:10Z","closed_at":null,"body":"running into an issue with gcloud-python not being able to communicate with the datastore emulator.\r\n\r\nwas able to reproduce this on both python 2.7.12 and 3.5.1\r\ngcloud-python is 0.18.3\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/client.py\", line 329, in put\r\n    self.put_multi(entities=[entity])\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/client.py\", line 355, in put_multi\r\n    current.commit()\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/batch.py\", line 260, in commit\r\n    self._commit()\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/batch.py\", line 243, in _commit\r\n    self.project, self._commit_request, self._id)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/connection.py\", line 342, in commit\r\n    _datastore_pb2.CommitResponse)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/connection.py\", line 124, in _rpc\r\n    data=request_pb.SerializeToString())\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/gcloud/datastore/connection.py\", line 97, in _request\r\n    error_status = status_pb2.Status.FromString(content)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/google/protobuf/internal/python_message.py\", line 780, in FromString\r\n    message.MergeFromString(s)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/google/protobuf/internal/python_message.py\", line 1087, in MergeFromString\r\n    if self._InternalParse(serialized, 0, length) != length:\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/google/protobuf/internal/python_message.py\", line 1113, in InternalParse\r\n    new_pos = local_SkipField(buffer, new_pos, end, tag_bytes)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/google/protobuf/internal/decoder.py\", line 850, in SkipField\r\n    return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end)\r\n  File \"/Users/mattwarren/Work/cui-svc/venv/lib/python2.7/site-packages/google/protobuf/internal/decoder.py\", line 820, in _RaiseInvalidWireType\r\n    raise _DecodeError('Tag had invalid wire type.')\r\ngoogle.protobuf.message.DecodeError: Tag had invalid wire type.\r\n```\r\n\r\nHere's how to reproduce:\r\n\r\n```\r\n$  gcloud beta emulators datastore start --project=proj &\r\n$  $(gcloud beta emulators datastore env-init) \r\n$  python\r\nPython 3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44) \r\n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from gcloud import datastore\r\n\r\nclient = datastore.Client()\r\nentity = datastore.Entity(client.key('Test1'))\r\nclient.put(entity)\r\n>>> \r\n>>> client = datastore.Client()\r\n>>> entity = datastore.Entity(client.key('Test1'))\r\n>>> client.put(entity)\r\n[datastore] Nov 16, 2016 4:32:47 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete\r\n[datastore] INFO: Adding handler(s) to newly registered Channel.\r\n[datastore] Nov 16, 2016 4:32:48 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead\r\n[datastore] INFO: Detected non-HTTP/2 connection.\r\n[datastore] Nov 16, 2016 4:32:48 PM io.gapi.emulators.netty.NotFoundHandler handleRequest\r\n[datastore] INFO: Unknown request URI: /datastore/v1beta3/projects/proj:commit\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/client.py\", line 329, in put\r\n    self.put_multi(entities=[entity])\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/client.py\", line 355, in put_multi\r\n    current.commit()\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/batch.py\", line 260, in commit\r\n    self._commit()\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/batch.py\", line 243, in _commit\r\n    self.project, self._commit_request, self._id)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/connection.py\", line 342, in commit\r\n    _datastore_pb2.CommitResponse)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/connection.py\", line 124, in _rpc\r\n    data=request_pb.SerializeToString())\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/gcloud/datastore/connection.py\", line 97, in _request\r\n    error_status = status_pb2.Status.FromString(content)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/google/protobuf/internal/python_message.py\", line 780, in FromString\r\n    message.MergeFromString(s)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/google/protobuf/internal/python_message.py\", line 1087, in MergeFromString\r\n    if self._InternalParse(serialized, 0, length) != length:\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/google/protobuf/internal/python_message.py\", line 1113, in InternalParse\r\n    new_pos = local_SkipField(buffer, new_pos, end, tag_bytes)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/google/protobuf/internal/decoder.py\", line 850, in SkipField\r\n    return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end)\r\n  File \"/Users/mattwarren/Work/cui-svc/nl_api/venv/lib/python3.5/site-packages/google/protobuf/internal/decoder.py\", line 820, in _RaiseInvalidWireType\r\n    raise _DecodeError('Tag had invalid wire type.')\r\ngoogle.protobuf.message.DecodeError: Tag had invalid wire type.\r\n```\r\n\r\nyou can see the `[datastore]` lines in that output to suggest an unknown URI."}}
{"actor":{"display_login":"mattwarrenrnp"}}