AttributeError: results while link_manager_to_client by google-ads-api

18 views
Skip to first unread message

jia Jimmy

unread,
Aug 23, 2019, 8:54:21 AM8/23/19
to AdWords API and Google Ads API Forum
I'm following link_manager_to_client codes example

but it showed error:
Traceback (most recent call last):
  File "demo.py", line 204, in <module>
    foo4()
  File "demo.py", line 189, in foo4
    link_manager_to_client(client, "xxx6739927", "1xxx8517")
  File "demo.py", line 134, in link_manager_to_client
    resource_name = response.results[0].resource_name
AttributeError: results
# result is right attribute



and  after GoogleAdsService search

 ga_service = client.get_service('GoogleAdsService', version='v2')
    response = ga_service.search(manager_id, query=query)


response has no attribute result as below:



Traceback (most recent call last):
  File "demo.py", line 205, in <module>
    foo4()
  File "demo.py", line 190, in foo4
    link_manager_to_client(client, "xxx", "xxx")
  File "demo.py", line 160, in link_manager_to_client
    for row in response.result:
AttributeError: 'GRPCIterator' object has no attribute 'result'


after fix it by my hand..another error happened

Traceback (most recent call last):
  File "demo.py", line 203, in <module>
    foo4()
  File "demo.py", line 188, in foo4
    link_manager_to_client(client, "xxxx", "xxxxx")
  File "demo.py", line 166, in link_manager_to_client
    client_id, manager_id, manager_link_id))
AttributeError: 'str' object has no attribute 'value'


Google Ads API Forum Advisor Prod

unread,
Aug 26, 2019, 8:32:38 AM8/26/19
to 5424...@qq.com, adwor...@googlegroups.com
Hi Jimmy, 

I was not able to replicate the issue with the Link Manager to Client Python code sample. Could you please share the code snippet that you are trying to have a closer look? You can share the details privately via Reply privately to author option. 

Regards,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UHEUS9:ref
Reply all
Reply to author
Forward
0 new messages