Closed sidd-ideaclan closed 1 year ago
@sidd-ideaclan - thanks for the question. The reason the assignment is raising an error is that - I'm assuming - you have the use-proto-plus
configuration set to False
. Normal protobuf messages will only let you make assignments for scalar fields (i.e. strings, enums, numbers). So you have two options here:
Keep use-proto-plus
set to False
and update the AdTextAsset
on the AdGroupAd
instead of creating it separately. I'm not sure what fields you're modifying, but it would look something like this:
ad_group_ad.ad.responsive_display_ad.long_headline.text = "this is a long headline"
ad_group_ad.ad.responsive_display_ad.long_headline.pinned_field = client.enums.AD_IMAGE
Change use-proto-plus
to True
and you can make assignments to non-scalar fields.
Hi, I am trying to create a Responsive Display Ad and getting this error while assigning value to the required field 'long_headline' -
It is due to this line -
I know that 'long_headline' field is not a list, this is why I used assignment. But I also tried using the below method-
and as expected, this error came-
What am I doing wrong?