We had been using the old Adwords API for over 5 years and rarely - if ever - recieved errors from the server other than the occasional "time out".
But since moving over, in the last couple of months we've been getting a handful of 500 server side errors. Below is the stack trace. We run this command for all clients every day, and when we get this error we just run it again and it works.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/google/api_core/grpc_helpers.py", line 67, in error_remapped_callable
return callable_(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 221, in __call__
compression=compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 257, in _with_call
return call.result(), call
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 343, in result
raise self
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 247, in continuation
compression=new_compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 271, in with_call
compression=compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 257, in _with_call
return call.result(), call
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 343, in result
raise self
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 247, in continuation
compression=new_compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 271, in with_call
compression=compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 256, in _with_call
request)
File "/usr/local/lib/python3.6/dist-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 169, in intercept_unary_unary
self._handle_grpc_failure(response)
File "/usr/local/lib/python3.6/dist-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 141, in _handle_grpc_failure
raise self._get_error_from_response(response)
File "/usr/local/lib/python3.6/dist-packages/grpc/_interceptor.py", line 247, in continuation
compression=new_compression)
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 957, in with_call
return _end_unary_response_blocking(state, call, True, None)
File "/usr/local/lib/python3.6/dist-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Internal error encountered."
debug_error_string = "{"created":"@1653526718.874180012","description":"Error received from peer ipv4:
74.125.193.95:443","file":"src/core/lib/surface/call.cc","file_line":903,"grpc_message":"Internal error encountered.","grpc_status":13}"
>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
...
retrieved_data = self.ga_service.search(request=self.request)
File "/usr/local/lib/python3.6/dist-packages/google/ads/googleads/v8/services/services/google_ads_service/client.py", line 2764, in search
request, retry=retry, timeout=timeout, metadata=metadata,
File "/usr/local/lib/python3.6/dist-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
return wrapped_func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/google/api_core/grpc_helpers.py", line 69, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.InternalServerError: 500 Internal error encountered.