Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect example #1183

Closed
euri10 opened this issue Oct 31, 2017 · 2 comments
Closed

incorrect example #1183

euri10 opened this issue Oct 31, 2017 · 2 comments
Assignees

Comments

@euri10
Copy link

euri10 commented Oct 31, 2017

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/pubsub/cloud-client/subscriber.py#L33-L35

Did you change the file? If so, how?

list_subscriptions takes the project_path as parameter, not the topic_path

correct method would be

def list_subscriptions(project):
    """Lists all subscriptions for a given topic."""
    subscriber = pubsub_v1.SubscriberClient()
    project_path = subscriber.project_path(project)

    for subscription in subscriber.list_subscriptions(project_path):
        print(subscription.name)

Describe the issue

@michaelawyu
Copy link
Contributor

@jonparrott I think the problem would be solved if pull request #1169 is merged :)

@theacodes
Copy link
Contributor

donion rings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants