Rajnil Guha
Rajnil Guha

Reputation: 435

Google Cloud Pub/Sub publish issue

I am pretty new to Google Cloud Pub/Sub, so I am just playing around with the code that is available on the docs in order to know the service better. In this instance I am trying to execute the simple code on the official docs to publish some data into a topic. But I am encountering an issue. There is an error which states topic_path() is not a member of PublisherClient. Has anyone else faced this issue? Below is the snapshot.

enter image description here

Upvotes: 1

Views: 583

Answers (1)

Dustin Ingram
Dustin Ingram

Reputation: 21520

The issue is that the PublisherClient instance has dynamic attributes, so pylint is unable to infer the members of the instance (I'm assuming you're using pylint based on the linting message).

You can ignore this for all google.cloud.* packages by setting this in your .pylintrc:

generated-members=google.cloud.*

Upvotes: 2

Related Questions