500 server errors since moving to the latest google api

48 views
Skip to first unread message

CUBED Data

unread,
May 26, 2022, 4:06:39 AM5/26/22
to Google Ads API and AdWords API Forum
(How do I format code in these?)

We have recently moved from the old googleads: https://github.com/googleads/googleads-python-lib to the new google-ads: https://github.com/googleads/google-ads-python , and have been using the new Google API to return our Adwords data.

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.

Any help would be greatly appreicated:

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.

Google Ads API Forum Advisor

unread,
May 27, 2022, 1:46:24 AM5/27/22
to da...@withcubed.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to our API support team and for reporting this issue.

So that I may raise the 500 Internal error that you encountered to the rest of our team, could you confirm if these are consistently occurring even after retries, as mentioned here? In addition, could you also provide the complete request and response logs and request-id, generated when the errors occurred?

If you haven't yet and since you are using Python, you may refer to this guide on how to enable logging. You may then retry your requests to replicate the error and send over to our team the generated logs.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bDieY:ref
Reply all
Reply to author
Forward
0 new messages