Hi Shree,

The selector fields should be LabelId and LabelName. See the documentation 
of Label type for 
details. 
https://developers.google.com/adwords/api/docs/reference/v201409/LabelService.Label

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Thursday, January 15, 2015 at 12:35:55 PM UTC+5:30, Shree wrote:
>
> I am trying to write a code in Python to check if Label 'MyLabel' already 
> exists in my adwords account.
> How to specify serviceSelector in LabelService.get ? How to make the code 
> working ?
>     
>     label_service = client.GetService('LabelService', version='v201409')
>     serviceSelector = {'fields': ['id', 'name'],
>                   'predicates' : {'field' : 'name', 'operator' : 'EQUALS', 
> 'values' : 'MyLabel'}
>                 }
>     result =  label_service.get(serviceSelector)
>
> Gives me error  for fields id and name : SelectorError.INVALID_FIELD_NAME 
> @serviceSelector
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7583f3cc-10d2-4c2c-bfac-b285f46ec466%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to