StatusCode.INVALID_ARGUMENT
Describe the bug: I'm receiving the error StatusCode.INVALID_ARGUMENT, but I can't find the cause.
Steps to Reproduce:
import os from datetime import date, timedelta as td from google.ads.googleads.client import GoogleAdsClient
DEFAULT_DATE_FORMAT = "%Y-%m-%d"
yaml_path = "google_secrets/googleads.yaml" os_path = os.path.abspath(yaml_path) client = GoogleAdsClient.load_from_storage(os_path, version="v15") search_request = client.get_type("SearchGoogleAdsStreamRequest") search_request.customer_id = "XXXXXXXXXXX"
partial_report_query = f"""SELECT segments.product_item_id, metrics.clicks, metrics.cost_micros, metrics.impressions, metrics.conversions, segments.device, segments.date, campaign.id FROM shopping_performance_view WHERE segments.date DURING LAST_30_DAYS AND segments.device IN ('DESKTOP')""" search_request.query = partial_report_query stream = client.get_service("GoogleAdsService").search_stream(search_request)
for batch in stream: for row in batch.results: print(r)
Expected behavior: Return query result
Client library version and API version: Client library version: google-ads==22.1.0 Google Ads API version: 15
Request/Response Logs:
Anything else we should know about your project / environment:
I have been receiving the same error with the shopping_performance_view resource and API version 16 since august 1.
I have the same problem since august 1. I saw is caused by the segments.product data
I have the same problem since august 1. if delete these fields: ''' segments.product_item_id, segments.product_brand, segments.product_type_l1, segments.product_type_l2, segments.product_type_l3 ''' it can work. but these are necessary for me. When will this be fixed? @BenRKarl
I first deleted this fields, but after I noticed that giving format vchar with 150 characters or more it runs 😉
De: lzmai @.> Enviado el: miércoles, 7 de agosto de 2024 4:01 Para: googleads/google-ads-python @.> CC: Daniel Montaño @.>; Comment @.> Asunto: Re: [googleads/google-ads-python] StatusCode.INVALID_ARGUMENT (Issue #878)
No suele recibir correos electrónicos de @.@.>. Por qué esto es importantehttps://aka.ms/LearnAboutSenderIdentification
Atención: Este es un correo electrónico externo. Tenga cuidado al hacer clic en los enlaces o abrir archivos adjuntos. En caso de duda, póngase en contacto con el departamento informático.
I have the same problem since august 1. if delete these fields: ''' segments.product_item_id, segments.product_brand, segments.product_type_l1, segments.product_type_l2, segments.product_type_l3 ''' it can work. but these are necessary for me. When will this be fixed?
— Reply to this email directly, view it on GitHubhttps://github.com/googleads/google-ads-python/issues/878#issuecomment-2272476274, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCNUT4C3XMR3AKAV3B444SDZQF5XLAVCNFSM6AAAAABMAWBQAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGQ3TMMRXGQ. You are receiving this because you commented.Message ID: @.@.>>
@gp34446 are you still having this issue? When I test your query, I don't get the same error, so perhaps it has been fixed. If you can still reproduce this, please share the Request Id that shows the error. Thanks!
Marking this as closed for now, assuming the issue was resolved. Please add a comment or re-open if more information is needed.