-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.
Description
If a message is published with a string of 0 length (topic.publish( '', url=url, title=title)) when the message is received there is no data field in the message and a key error is thrown when trying to transform the message from the PubSub API representation.
Traceback (most recent call last):
File "/en_notifications/en_notifications.py", line 51, in <module>
received = PS_SUBSCRIPTION.pull(max_messages=PULL_COUNT)
File "/usr/local/lib/python2.7/dist-packages/gcloud/pubsub/subscription.py", line 212, in pull
File "/usr/local/lib/python2.7/dist-packages/gcloud/pubsub/message.py", line 74, in from_api_repr
for info in response.get('receivedMessages', ())]
data = base64.b64decode(api_repr['data'])
KeyError: 'data'
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.