googleads.yaml Location Problem

2,901 views
Skip to first unread message

Sam

unread,
Dec 2, 2014, 5:20:34 PM12/2/14
to adwor...@googlegroups.com
Probably a stupid question, but I'm just starting to play around using Python and testing using the examples in the library, but am getting an error where the googleads.yaml file (which is up to date) is being search for in a location other than the one in which it sits (its original one when unzipped - C:\Python27\TestApp\googleads-python-lib-master). The error is:

PS C:\Python27\TestApp\googleads-python-lib-master\examples\adwords\v201409\reporting> python get_report_fields.py
Traceback (most recent call last):
  File "get_report_fields.py", line 54, in <module>
    adwords_client = adwords.AdWordsClient.LoadFromStorage()
  File "build\bdist.win32\egg\googleads\adwords.py", line 218, in LoadFromStorage
  File "build\bdist.win32\egg\googleads\common.py", line 81, in LoadFromStorage
googleads.errors.GoogleAdsValueError: Given yaml file, C:\Users\Sam\googleads.yaml, could not be opened.

Do I need to move the file to this location? Why is this?

Josh Radcliff (AdWords API Team)

unread,
Dec 2, 2014, 5:48:21 PM12/2/14
to adwor...@googlegroups.com
Hi,

By default, the library is going to look for your configuration file in your home directory. However, if you want it to load the file from an alternate location you can pass the path when creating your AdWords client, e.g.,

adwords_client = AdWordsClient.LoadFromStorage("full_path_to_your_config")

Cheers,
Josh, AdWords API Team

atro...@prosper.com

unread,
Mar 5, 2015, 5:37:35 PM3/5/15
to adwor...@googlegroups.com
What is the name of the config file? 

Josh Radcliff (AdWords API Team)

unread,
Mar 5, 2015, 5:46:17 PM3/5/15
to adwor...@googlegroups.com
Hi,

The file is named googleads.yaml. There's a sample version of this file in the library as well.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages