Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusCode.INVALID_ARGUMENT #878

Open
gp34446 opened this issue Aug 5, 2024 · 4 comments
Open

StatusCode.INVALID_ARGUMENT #878

gp34446 opened this issue Aug 5, 2024 · 4 comments
Labels
bug Something isn't working triage New issue; requires attention

Comments

@gp34446
Copy link

gp34446 commented Aug 5, 2024

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:

@gp34446 gp34446 added bug Something isn't working triage New issue; requires attention labels Aug 5, 2024
@JulioG-Data
Copy link

JulioG-Data commented Aug 5, 2024

I have been receiving the same error with the shopping_performance_view resource and API version 16 since august 1.

@DaniMontano
Copy link

I have the same problem since august 1. I saw is caused by the segments.product data

@lzmai
Copy link

lzmai commented Aug 7, 2024

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

@DaniMontano
Copy link

DaniMontano commented Aug 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issue; requires attention
Projects
None yet
Development

No branches or pull requests

4 participants