hi Sai, yes, I was trying to follow the example file on git.
But still get this error, headlinePart2 is a typo. But looks there is more
things here, *the KeyError* starts from ‘headlinePart1’. I will reply you
separately with actual code and soap file. Thank you.
Traceback (most recent call last):
File
"/Users/stellayang/Library/Python/3.6/lib/python/site-packages/IPython/core/interactiveshell.py",
line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-76-046e583b84fd>", line 2, in <module>
ads_uploaded =
ad_group_ad_service.mutate(add_adgroup_operations)['value']
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1374, in MakeSoapRequest
packed_args = self._PackArguments(method_name, args)
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1232, in _PackArguments
for ((_, param), param_data) in zip(op_params, args)]
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1232, in <listcomp>
for ((_, param), param_data) in zip(op_params, args)]
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1287, in _PackArgumentsHelper
for item in data]
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1287, in <listcomp>
for item in data]
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1277, in _PackArgumentsHelper
elem_type, type_override is not None, data_formatted, set_type_attrs)
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in _CreateComplexTypeFromData
for k, v in data if k != 'xsi_type'}
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in <dictcomp>
for k, v in data if k != 'xsi_type'}
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1277, in _PackArgumentsHelper
elem_type, type_override is not None, data_formatted, set_type_attrs)
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in _CreateComplexTypeFromData
for k, v in data if k != 'xsi_type'}
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in <dictcomp>
for k, v in data if k != 'xsi_type'}
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1277, in _PackArgumentsHelper
elem_type, type_override is not None, data_formatted, set_type_attrs)
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in _CreateComplexTypeFromData
for k, v in data if k != 'xsi_type'}
File "/usr/local/lib/python3.6/site-packages/googleads/common.py", line
1344, in <dictcomp>
for k, v in data if k != 'xsi_type'}
KeyError: 'headlinePart1'
On Fri, Feb 22, 2019 at 12:08 PM googleadsapi-forumadvisor via AdWords API
and Google Ads API Forum <[email protected]> wrote:
> Hello Yang,
>
> Looks like on your second screenshot you are passing headlinePart2 a
> second time with no value which caused the operations to fail. Please note
> that while adding the ExpandedTextAds headlinePart1, headlinePart2,
> Description and FinalUrls are mandatory fields. You could refer our client
> library example
> <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201809/basic_operations/add_expanded_text_ads.py>
> to
> add ExpandedTextAds. Please let me know if you have any further questions.
>
> Regards,
> Sai Teja, AdWords API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey
> <https://support.google.com/google-ads/contact/survey_transactional?caseid=9-2409000025373&hl=en&ctx=1>
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
>
> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 a topic in the
> Google Groups "AdWords API and Google Ads API Forum" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/adwords-api/ityc-5l8D40/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/00d12gm89o000000o5acl60005g5t0w74mj4d1g74o30c1g68qj6dpj%40mail.gmail.com
> <https://groups.google.com/d/msgid/adwords-api/00d12gm89o000000o5acl60005g5t0w74mj4d1g74o30c1g68qj6dpj%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/CAAkCBLdCLq6yU00eWMVY%2B3eWWyf9RQukZW%3DDEqw3VaYWTwp%2BAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.