You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
Activity
tseaver commentedon Feb 17, 2016
Thank you for the report!
fix: Fix timeout default values (#1480)
chore(deps): update dependency shapely to v2.0.1 (#1480)
chore: Add gcp resource name span attribute (#1480)
fix: use `==` instead of `is` for timedelta type equality checks (#1480)
docs: migrate code from googleapis/python-bigquery (#18303)