googleads / googleads-python-lib

The Python client library for Google's Ads APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

google.api_core.exceptions.ServiceUnavailable: 503 Bad file descriptor in v12

apienkos opened this issue · comments

Recently we upgrade from v11 which was fully deprecated, to v12 of google ads, which is deprecated but still functioning. We wanted to upgrade to v13 but there was no build in airflow that allowed us to satisfy library issues.

In v12 we're getting the error "google.api_core.exceptions.ServiceUnavailable: 503 Bad file descriptor" when calling
search_stream(search_request).

Relevant lines of code for setting this up are;
googleads_client = GoogleAdsClient.load_from_storage(os_path, version="v12")

ga_service = googleads_client.get_service("GoogleAdsService")
search_request = googleads_client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = {customer_id}

The search_request is this query: SELECT
segments.product_item_id,
metrics.clicks,
metrics.cost_micros,
metrics.impressions,
metrics.conversions,
segments.device,
campaign.id
FROM shopping_performance_view
WHERE
segments.date DURING LAST_30_DAYS
AND segments.device IN ('{device}')

I've attached the log, but did something get deprecated in the way that we can invoke this service from v11 to v12?

google error log.txt

This is the library for the Ad Manager SOAP API, for the Google Ads API, see this repo:
https://github.com/googleads/google-ads-python