Skip to content

Demo "Publish messages and subscribe to Pub/Sub topics" doesn't work  #1127

Closed
@jpvic

Description

The 3th demo doesn't work on "https://cloud.google.com/python/"

from gcloud import pubsub

client = pubsub.Client(project='your-project-id')
topic = client.topic('your-topic-name')

topic.publish('Ping!')

subscription = topic.subscription('your-subscription-name')

messages = subcription.pull()

for ackid, message in messages:
print message

subscription.acknowledge([ackid for ackid, _ in messages])

messages = subcription.pull()
==> typo : subscription.pull()

the example ends with 👍 raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
It tried a json object, but then it asks for a string...

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions