- Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
api: clouderrorreportingIssues related to the googleapis/python-error-reporting API.Issues related to the googleapis/python-error-reporting API.lang: pythonIssues specific to Python.Issues specific to Python.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
When GRPC is disabled, report_exception and report fails.
Environment details
- OS type and version: Windows 10, build 19043.1052
- Python version: 3.8.2
- pip version: 21.1.2
google-cloud-error-reporting
version: 1.1.2
Steps to reproduce
- set the environment variable GOOGLE_CLOUD_DISABLE_GRPC=true
- create an error reporting client (google.cloud.error_reporting.Client)
- report a test message
- you should see the following message
TypeError: __init__() takes 1 positional argument but 3 positional arguments (and 3 keyword-only arguments) were given
This is caused by _ErrorReportingLoggingAPI object creation in the report_errors_api property of the client.
Code example
from google.cloud.error_reporting import Client error_reporting_client = Client(service='test-service') error_reporting_client.report('test-message')
Stack trace
Traceback (most recent call last): File "logging_setup.py", line 90, in <module> test() File "logging_setup.py", line 86, in test error_reporting_client.report('test-message') File "venv\lib\site-packages\google\cloud\error_reporting\client.py", line 358, in report self._send_error_report( File "venv\lib\site-packages\google\cloud\error_reporting\client.py", line 318, in _send_error_report self.report_errors_api.report_error_event(error_report) File "venv\lib\site-packages\google\cloud\error_reporting\client.py", line 205, in report_errors_api self._report_errors_api = _ErrorReportingLoggingAPI( File "venv\lib\site-packages\google\cloud\error_reporting\_logging.py", line 72, in __init__ self.logging_client = google.cloud.logging.Client( TypeError: __init__() takes 1 positional argument but 3 positional arguments (and 3 keyword-only arguments) were given
astanway
Metadata
Metadata
Assignees
Labels
api: clouderrorreportingIssues related to the googleapis/python-error-reporting API.Issues related to the googleapis/python-error-reporting API.lang: pythonIssues specific to Python.Issues specific to Python.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.