I attempted to follow the setup instructions and ran into an odd error. The instructions I was following are here: https://googlecloudplatform.github.io/gcloud-python/stable/gcloud-auth.html
Here is what I attempted:
virtualenv ~/venv
source ~/venv/bin/activate
pip install gcloud
gcloud auth login
python
>>> from gcloud import pubsub
>>> pubsub.Client()
Here's the error I received when I ran pubsub.Client()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../venv/local/lib/python2.7/site-packages/gcloud/client.py", line 184, in __init__
_ClientProjectMixin.__init__(self, project=project)
File ".../venv/local/lib/python2.7/site-packages/gcloud/client.py", line 143, in __init__
raise EnvironmentError('Project was not passed and could not be '
EnvironmentError: Project was not passed and could not be determined from the environment.
I do appear to have valid credentials. gcloud.credentials.get_credentials() happily provides me with a perfectly good GoogleCredentials object which works fine with httplib2 if I invoke it directly.
I attempted to follow the setup instructions and ran into an odd error. The instructions I was following are here: https://googlecloudplatform.github.io/gcloud-python/stable/gcloud-auth.html
Here is what I attempted:
virtualenv ~/venvsource ~/venv/bin/activatepip install gcloudgcloud auth loginpythonHere's the error I received when I ran pubsub.Client()
I do appear to have valid credentials.
gcloud.credentials.get_credentials()happily provides me with a perfectly good GoogleCredentials object which works fine with httplib2 if I invoke it directly.