I am new to Google Ads API, and I am following the following repository, which contains python samples for the dfa reporting API:

https://github.com/googleads/googleads-dfa-reporting-samples/blob/main/python/v4/

I am using an user account, and I am able to run authenticate_user_account.py obtaining authentification successful. However, when I am trying to run the get_campaigns.py I obtain a TypeError:

Traceback (most recent call last):   File "/Users/jozaita/Documents/googleads-dfa-reporting-samples/python/v4/get_campaigns.py", line 64, in <module>     main(sys.argv)   File "/Users/jozaita/Documents/googleads-dfa-reporting-samples/python/v4/get_campaigns.py", line 43, in main     request = service.campaigns().list(profileId=profile_id)               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/Users/jozaita/Documents/googleads-dfa-reporting-samples/venv/lib/python3.12/site-packages/googleapiclient/discovery.py", line 1122, in method     for pvalue in pvalues: TypeError: 'int' object is not iterable 

I am running the command as :

python3 python/v4/get_campaigns.py  XXXXXXXXX 

Where XXXXXXXXX is a number.

Can anyone help to show which is my mistake, or how can I get over this issue?

Thank you very much in advance

I searched in google there is additional information , I have found the same mistake in the Google Ad GoogleGroups but I am not able to join or get to the GoogleGroups conversation

Tag:google-ads-api

Add a new comment.