I was able to solve the above using CopyFrom, but that works but I got this

AttributeError: Assignment not allowed to message, map, or repeated field 
"keyword_themes" in protocol message object.


But I got a different error 
AttributeError: 'google._upb._message.RepeatedCompositeContainer' object 
has no attribute 'CopyFrom'


On Friday, June 30, 2023 at 7:26:59 PM UTC+1 souv...@gmail.com wrote:

> Hi.
>
> All I am trying to do is create a smart ad following the example given here
>
> https://developers.google.com/google-ads/api/samples/add-smart-campaign
>
> here is my code where I am getting the error
>
> suggestion_infor object
>
> final_url: "https://xxxxx/";
> language_code: "en"
> business_context {
>   business_name: "xxx"
> }
> location_list {
>   locations {
>     geo_target_constant: "geoTargetConstants/1023191"
>   }
> }
>
> the error I get while setting up  SuggestKeywordThemesRequest
>
> suggest_keyword_request = client.get_type("SuggestKeywordThemesRequest")
> suggest_keyword_request.customer_id = str(customer_id)
> #print(suggestion_info)
> suggest_keyword_request.suggestion_info = suggestion_info
> print(suggest_keyword_request)
>
> Error 
>
>     suggest_keyword_request.suggestion_info = suggestion_info
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: Assignment not allowed to message, map, or repeated field 
> “suggestion_info” in protocol message object.
>
> can you help me out, I am bit stuck
>
> Thanks
> Souvik
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/1e2b624c-1a80-4e6e-96d4-e89370c1f39fn%40googlegroups.com.
  • I ... souv...@gmail.com
    • ... souv...@gmail.com
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to