Hello,
I'm using the google-ads python client and am attempting to troubleshoot the following error:
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = "GRPC target method can't be resolved."
debug_error_string = "{"created":"@1661869388.853682000","description":"Error received from peer ipv4:
74.125.138.95:443","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"GRPC target method can't be resolved.","grpc_status":12}"
google.api_core.exceptions.MethodNotImplemented: 501 GRPC target method can't be resolved.
I currently have google-ads version 7.0.0 and grpcio 1.47.0 installed. Due to the requirements of our project, I can't use a newer version of google-ads than 7.0.0. I've tried installing and using various older versions of grpcio to no avail. I've checked the requirements of each module installed as a requirement of google-ads 7.0.0 (google-api-core, proto-plus, google-auth, etc.), and there are no conflicting versions.
I've tried using both the SearchGoogleAdsStreamRequest and SearchGoogleAdsRequest request types, but I get the same error from both. Is it possible to make a request and retrieve a response from the Google Ads API using google-ads version 7.0.0 or am I forced to install a newer version?
Sample code for reference:
from google.ads.google_ads.client import GoogleAdsClient
creds_dict = {
"developer_token": "REDACTED",
"refresh_token": "REDACTED",
"client_id": "REDACTED",
"client_secret": "REDACTED",
"use_proto_plus": "True",
"login_customer_id": "REDACTED"
}
client = GoogleAdsClient.load_from_dict(creds_dict)
ga_service = client.get_service("GoogleAdsService")
search_request = client.get_type("SearchGoogleAdsStreamRequest")
customer_id = "REDACTED"
query = """
SELECT
customer_client.client_customer,
customer_client.status
FROM customer_client
"""
stream = ga_service.search_stream(customer_id=customer_id, query=query)
I'd really appreciate any and all assistance! Let me know if there's any other information I can provide that'd be helpful.