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
$ python publisher.py list
Traceback (most recent call last):
File "publisher.py", line 93, in <module>
list_topics()
File "publisher.py", line 33, in list_topics
for topic in pubsub_client.list_topics():
File "/usr/local/lib/python2.7/dist-packages/google/cloud/iterator.py", line 210, in _items_iter
for page in self._page_iter(increment=False):
File "/usr/local/lib/python2.7/dist-packages/google/cloud/iterator.py", line 239, in _page_iter
page = self._next_page()
File "/usr/local/lib/python2.7/dist-packages/google/cloud/iterator.py", line 437, in _next_page
items = six.next(self._gax_page_iter)
File "/usr/local/lib/python2.7/dist-packages/google/gax/__init__.py", line 435, in next
return self.__next__()
errors.create_error('RPC failed', cause=exception))
google.gax.errors.GaxError: GaxError(RPC failed, caused by <_Rendezvous of RPC that terminated with (StatusCode.PERMISSION_DENIED, User not authorized to perform this action.)>)
I'm running this inside the Cloud Shell on a project with Cloud Pub/Sub API enabled and some topics set up. gcloud auth list shows my account, cloud auth login greatly discourages me to use it inside a Cloud Shell so I haven't tried refreshing my credentials.
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/pubsub/cloud-client/publisher.py
Did you change the file? If so, how?
Nope.
Describe the issue
Running the
pubsub.projects.topics.listapi from https://developers.google.com/apis-explorer workst just fine.I'm running this inside the Cloud Shell on a project with Cloud Pub/Sub API enabled and some topics set up.
gcloud auth listshows my account,cloud auth logingreatly discourages me to use it inside a Cloud Shell so I haven't tried refreshing my credentials.