AttributeError: 'str' object has no attribute 'value' when set resource_name of manager_link

17 views
Skip to first unread message

jia Jimmy

unread,
Aug 24, 2019, 10:09:12 AM8/24/19
to AdWords API and Google Ads API Forum
As google-ads-python(link_manager_to_client) suggesting codes example showed ,I tried with below code:



manager_link_operation = c_client.get_type(
        'CustomerManagerLinkOperation', version='v2')

 manager_link = manager_link_operation.update

manager_link.resource_name.value = (
        'customers/{}/customerManagerLinks/{}~{}'.format(
            client_id, manager_id, manager_link_id))


But I got error like :

Traceback (most recent call last):
  File "demo.py", line 210, in <module>
    foo4()
  File "demo.py", line 195, in foo4
    link_manager_to_client(m_client, c_client, "xxxx", "xxxx")
  File "demo.py", line 174, in link_manager_to_client
    client_id, manager_id, manager_link_id))
AttributeError: 'str' object has no attribute 'value'


I'm just following the example in   google-ads-python, why I got unexpected  error?
Reply all
Reply to author
Forward
0 new messages