googleads-python-lib icon indicating copy to clipboard operation
googleads-python-lib copied to clipboard

Mapping Values Not Allowed

Open dprice60 opened this issue 12 years ago • 4 comments

I am completely new to using this library, I've generated a refresh token and stored the the client id, refresh token, and secret all in the googleads.yaml file on the top level of the examples download. But everytime that I try to run get_campaigns.py I receive the following error. "yaml.scanner.ScannerError: mapping values are not allowed here in "", line 5, column 57:"

I've already checked to make sure that I had spaces after all of the colons because I know that can cause problems, but I'm not sure what I am doing wrong. Any advice is greatly appreciated. It seems to me like maybe it doesn't like the / in the refresh token?

dprice60 avatar Mar 27 '14 16:03 dprice60

Hey there,

Forward slashes are allowed, I have them in my refresh tokens too. I think this error means that you are missing a space after the colon. (source) Make sure your token looks like this:

refresh_token: 1/abcDEfg12345

and not like this:

refresh_token:1/abcDEfg12345

jdilallo avatar Mar 27 '14 16:03 jdilallo

Sorry to double post - I was also able to replicate this error by not indenting all of the keys under a product by 2 spaces. All of the values under "adwords:", "dfp:", and/or "dfa:" must be indented by exactly 2 spaces.

jdilallo avatar Mar 27 '14 16:03 jdilallo

Thanks! I got it working now. Sorry for a rookie question, but I've got to start somewhere! Also thanks for the quick response time.

On Thu, Mar 27, 2014 at 10:33 AM, jdilallo [email protected] wrote:

Sorry to double post - I was also able to replicate this error by not indenting all of the keys under a product by 2 spaces. All of the values under "adwords:", "dfp:", and/or "dfa:" must be indented by exactly 2 spaces.

Reply to this email directly or view it on GitHubhttps://github.com/googleads/googleads-python-lib/issues/2#issuecomment-38827520 .

If At First You Don't Succeed, Skydiving Is Not For You

dprice60 avatar Mar 27 '14 16:03 dprice60

No apologies needed. Glad it you got it working.

jdilallo avatar Mar 27 '14 16:03 jdilallo