Hi 
I want to create a campaign criterion and want to set the gender(only 
visible to MALES) to it.

This is the code - 
campaign_criterion_service = client.get_service("CampaignCriterionService")

    campaign_criterion_operation = client.get_type(
"CampaignCriterionOperation")
    campaign_criterion = campaign_operation.create
    campaign_criterion.display_name = f"Testing_Criterion_Gender"
    campaign_criterion.type_ = 11
    campaign_criterion.gender = criteria.GenderInfo(
        type_ = 10
    )

But it shows this error - 
campaign.gender = criteria.GenderInfo(
AttributeError: Assignment not allowed to field "gender" in protocol 
message object.

How do I populate this field? Can you show me some example?

Thanks and Regards 
Shivam

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/afc5c496-13e8-4ead-a284-8df654945263n%40googlegroups.com.

Reply via email to