googleads/google-ads-python

API request error

wangzsPalpitate opened this issue · 0 comments

2024-08-29 16:40:59 - INFO] Request

Method: /google.ads.googleads.v15.services.GoogleAdsService/SearchStream
Host: googleads.googleapis.com
Headers: {
"developer-token": "REDACTED",
"login-customer-id": "xxxxxx",
"x-goog-api-client": "gl-python/3.7.8 grpc/1.57.0 gax/2.19.1 gccl/22.1.0 pb/3.20.1+c",
"x-goog-request-params": "customer_id=xxxxx"
}
Request: customer_id: "xxxxxxx"
query: "\n SELECT\n -- campaign.name,\n -- campaign.id,\n -- campaign.advertising_channel_type,\n -- campaign.labels,\n -- metrics.clicks,\n -- metrics.conversions,\n -- metrics.conversions_value,\n -- metrics.ctr,\n -- metrics.impressions,\n -- metrics.average_cpc,\n metrics.cost_micros,\n -- customer.currency_code,\n -- metrics.search_click_share,\n -- metrics.search_impression_share,\n -- metrics.top_impression_percentage,\n -- metrics.search_top_impression_share,\n customer.id,\n customer.descriptive_name,\n segments.date,\n segments.hour\n FROM customer\n WHERE segments.date >= '2024-08-25'\n AND segments.date <= '2024-08-29'\n -- AND campaign.name REGEXP_MATCH '(-and-)|(-ios-)'\n "

Response

Headers: {}
Fault: {}

[2024-08-29 16:40:59 - WARNING] Request made: ClientCustomerId: 3915510646, Host: googleads.googleapis.com, Method: /google.ads.googleads.v15.services.GoogleAdsService/SearchStream, RequestId: None, IsFault: True, FaultMessage: failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.14.202:443: tcp handshaker shutdown
Traceback (most recent call last):
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/api_core/grpc_helpers.py", line 171, in error_remapped_callable
result, prefetch_first_result=prefetch_first
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/api_core/grpc_helpers.py", line 92, in init
self._stored_first_result = next(self._wrapped)
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 108, in next
raise e
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 105, in next
self._failure_handler(self._underlay_call)
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 71, in _handle_grpc_failure
raise self._get_error_from_response(response)
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 88, in next
message = next(self._underlay_call)
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/grpc/_channel.py", line 541, in next
return self._next()
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/grpc/_channel.py", line 774, in _next
return self._next_response()
File "/Users/wangzeshuai/Library/Python/3.7/lib/python/site-packages/grpc/_channel.py", line 748, in _next_response
raise self
grpc._channel._SingleThreadedRendezvous: <_SingleThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.14.202:443: tcp handshaker shutdown"
debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.14.202:443: tcp handshaker shutdown {grpc_status:14, created_time:"2024-08-29T16:40:59.28109+08:00"}"

It used to run stably before, but now this error occurs.
Please take a look at this issue. Thank you very much.