Campaign User List Criteria

71 views
Skip to first unread message

Roman Bondarenko

unread,
Feb 8, 2022, 2:18:17 AM2/8/22
to Google Ads API and AdWords API Forum
Hi team!

I found unexpected behavior today while attaching user list resources to a campaign. 
Here is what your doc says: UserListInfo
user_list - string: The User List resource name.

But when I'm trying to add user list resource name using this snippet:

campaign_criterion.user_list = user_list_service.user_list_path(
    customer_id,
    user_list_id,
)

I got such an error:
Parameter to MergeFrom() must be instance of same class: expected google.ads.googleads.v9.common.UserListInfo got str.

I am using google-ads = "==14.1.0"

Please, do fixes or update your doc. Or am I doing something wrong?

Thanks in advance!

Google Ads API Forum Advisor

unread,
Feb 8, 2022, 11:12:13 AM2/8/22
to roman.bo...@mint.ai, adwor...@googlegroups.com

Hello Roman,

Thanks for reaching out to the Google Ads API support. For us to investigate, we will need a full log of request and response logs with request ID and request header generated on your end of API communications of the report pull.

If you haven’t enabled the logging yet, it can be enabled by navigating to the Client libraries > Your client library (ex. Python) > Logging documentation, which you can access from this link

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2W5Gcp:ref

Roman Bondarenko

unread,
Feb 8, 2022, 11:22:23 AM2/8/22
to Google Ads API and AdWords API Forum

No logs, only python traceback. Google Ads Python package does not manage to send any requests because of an error which I described above which happens during preparing operations to run.
So to ensure you have to run Python code snippet to add user list to campaign criteria. 

Google Ads API Forum Advisor

unread,
Feb 8, 2022, 10:48:35 PM2/8/22
to roman.bo...@mint.ai, adwor...@googlegroups.com
Hi Roman,

Thank you for your reply.

Based on the description of the issue (Parameter to MergeFrom() must be instance of same class: expected google.ads.googleads.v9.common.UserListInfo got str.), this does not appear to be API specific and is more related to an issue with the client library implementation.

That said, I would recommend that you reach out instead to the Python client library owners via this link, as they should be more equipped to assist you on the issue, as well as how you may be able to enable logging.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5Gcp:ref
Reply all
Reply to author
Forward
0 new messages