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
{{ message }}
Repository navigation
AttributeError: 'str' object has no attribute '_credentials' #3071
Hi, I'm trying the example code and it's failing with the following exception:
>>> c = error_reporting.Client(project='<my-project-str>')
>>> try:
... raise NameError
... except Exception:
... c.report_exception()
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
NameError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/opt/python/3.6.0/lib/python3.6/site-packages/google/cloud/error_reporting/client.py", line 348, in report_exception
user=user)
File "/opt/python/3.6.0/lib/python3.6/site-packages/google/cloud/error_reporting/client.py", line 277, in _send_error_report
self.report_errors_api.report_error_event(error_report)
File "/opt/python/3.6.0/lib/python3.6/site-packages/google/cloud/error_reporting/client.py", line 162, in report_errors_api
self._report_errors_api = make_report_error_api(self._project)
File "/opt/python/3.6.0/lib/python3.6/site-packages/google/cloud/error_reporting/_gax.py", line 39, in make_report_error_api
client._credentials,
AttributeError: 'str' object has no attribute '_credentials'
Reading the source, this seems like a rather obvious error:
Activity
dhermes commentedon Feb 26, 2017
I would agree, it does seem like a rather obvious error. Thanks for reporting!
In the meantime, you can avoid this by setting
GOOGLE_CLOUD_DISABLE_GRPC=True, but we'll get a fix out.dhermes commentedon Feb 26, 2017
/cc @waprin @jonparrott
Passing along client instead of project when creating error API.
robhaswell commentedon Mar 8, 2017
Thanks for catching this. Please can you roll
0.23.1so we can deploy this fix?daspecster commentedon Mar 8, 2017
@lukesneeringer I can setup the release for this if you want?
lukesneeringer commentedon Mar 8, 2017
Yes please.
daspecster commentedon Mar 8, 2017
@robhaswell google-cloud-error-reporting 0.23.1 is up on PyPi.
robhaswell commentedon Mar 8, 2017
Passing along client instead of project when creating error API.
chore: move samples from python-docs-sample (#45)
Passing along client instead of project when creating error API.