{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1438","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1438/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1438/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1438/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/issues/1438","id":130710945,"number":1438,"title":"ValueError when trying to publish message (V 0.9)","user":{"login":"asaidomar","id":3934878,"avatar_url":"https://avatars.githubusercontent.com/u/3934878?v=3","gravatar_id":"","url":"https://api.github.com/users/asaidomar","html_url":"https://github.com/asaidomar","followers_url":"https://api.github.com/users/asaidomar/followers","following_url":"https://api.github.com/users/asaidomar/following{/other_user}","gists_url":"https://api.github.com/users/asaidomar/gists{/gist_id}","starred_url":"https://api.github.com/users/asaidomar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaidomar/subscriptions","organizations_url":"https://api.github.com/users/asaidomar/orgs","repos_url":"https://api.github.com/users/asaidomar/repos","events_url":"https://api.github.com/users/asaidomar/events{/privacy}","received_events_url":"https://api.github.com/users/asaidomar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels/pubsub","name":"pubsub","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-02T15:11:29Z","updated_at":"2016-02-20T02:02:17Z","closed_at":"2016-02-20T02:02:17Z","body":"When using the full path of the topic like this:\r\n\r\n```\r\nclass PubSubClient(CloudClient):\r\n\r\n    def __init__(self):\r\n        super().__init__()\r\n        client = pubsub.Client(\r\n            project=self.config.get(\"project\"), credentials=self.credentials)\r\n\r\n        self.client = client.topic(\"/projects/myprojectname/topics/files.dev\")\r\n\r\n    def publish(self, message):\r\n        self.client.publish(bytes(message, encoding=\"utf8\"))\r\n```\r\n\r\nI got the following error:\r\n\r\n```\r\n  File \"C:\\Python34\\lib\\json\\decoder.py\", line 343, in decode\r\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r\n  File \"C:\\Python34\\lib\\json\\decoder.py\", line 361, in raw_decode\r\n    raise ValueError(errmsg(\"Expecting value\", s, err.value)) from None\r\nValueError: Expecting value: line 1 column 1 (char 0)\r\n```\r\n\r\nIt's seem that the html response is decoded rather than the JSON response. \r\nWhen using the trailing name of the topic \"files.dev\", the message is published.\r\n\r\n\r\n\r\n\r\n"}}