Loading Error with the googleads.yaml file

756 views
Skip to first unread message

ni...@juniqe.com

unread,
Sep 13, 2018, 5:42:05 PM9/13/18
to AdWords API and Google Ads API Forum
Hej Community,

I wrote a script that pulls a performance report and based on KPI evaluation adds labels to ads.
When I run this script on my machine it works fine but when I copied the script and the googleads.yaml file to my colleagues PC, it doesn't work anymore.

Traceback (most recent call last):
 File "C:\Users\Juniqe\AppData\Local\Programs\Python\Python37\lib\site-packages\googleads\common.py", line 289, in LoadFromStorage
   optional_product_values)
 File "C:\Users\Juniqe\AppData\Local\Programs\Python\Python37\lib\site-packages\googleads\common.py", line 189, in LoadFromString
   'Please replace the "dfp" key in the configuration YAML string with'
googleads.errors.GoogleAdsValueError: Please replace the "dfp" key in the configuration YAML string with"ad_manager" to fix this issue.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "Evergreen_script.py", line 415, in <module>
   r"C:\Users\Juniqe\Desktop\evergreen script\googleads.yaml")
 File "C:\Users\Juniqe\AppData\Local\Programs\Python\Python37\lib\site-packages\googleads\adwords.py", line 243, in LoadFromStorage
   cls._OPTIONAL_INIT_VALUES))
 File "C:\Users\Juniqe\AppData\Local\Programs\Python\Python37\lib\site-packages\googleads\common.py", line 292, in LoadFromStorage
   'Given yaml file, %s, could not find some keys. %s' % (path, e))
googleads.errors.GoogleAdsValueError: Given yaml file, C:\Users\Juniqe\Desktop\evergreen_script\googleads.yaml, could not find some keys. Please replace the "dfp" key in the configuration YAML string with"ad_manager" to fix this issue.
Adding ad_manager to the dfp key does not fix this and it actually should not matter at all.

I don't know why it even checks the dfp keys as in my script I call adwordsclient not dfpclient.
adwords_client = adwords.AdWordsClient.LoadFromStorage(
        r"C:\Users\Juniqe\Desktop\evergreen_script\googleads.yaml")

We are using the latest version of googleads module and run it on Python 3.7.0

Hopefully, someone has an idea how I can solve this.

Cheers,
Nils

Luis Xander Talag (AdWords API Team)

unread,
Sep 14, 2018, 2:38:48 AM9/14/18
to AdWords API and Google Ads API Forum
Hi Nils,

This issue seems to be related to Python client library rather than the AdWords API. I would suggest to post your issue on this link as the client library owners are better equipped to assist you here.

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages