Hi all,
I have a problem with the adwords api for python using googleads for python
<https://github.com/googleads/googleads-python-lib>.
I'm trying to execute the operator REMOVE on a keyword in this way:
...
ad_group_criterion_service = client.GetService(
'AdGroupCriterionService', version='v201607')
# Construct operations and delete ad group criteria.
operations = [
{
'operator': 'REMOVE',
'operand': {
'xsi_type': 'BiddableAdGroupCriterion',
'adGroupId': ad_group_id,
'criterion': {
'id': criterion_id
}
}
}
]
result = ad_group_criterion_service.mutate(operations)
...
and an error occurred:
ERROR:suds.client:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/suds/transport/http.py",
line 82, in send
fp = self.u2open(u2request)
File "/usr/local/lib/python3.5/dist-packages/suds/transport/http.py",
line 132, in u2open
return url.open(u2request, timeout=tm)
File "/usr/lib/python3.5/urllib/request.py", line 472, in open
response = meth(req, response)
File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.5/urllib/request.py", line 510, in error
return self._call_chain(*args)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 590, in
http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 613,
in send
reply = self.options.transport.send(request)
File "/usr/local/lib/python3.5/dist-packages/suds/transport/http.py",
line 94, in send
raise TransportError(e.msg, e.code, e.fp)
suds.transport.TransportError: Internal Server Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "remove_keywords.py", line 35, in
main(_adwords.adwords_client, AD_GROUP_ID, CRITERION_ID)
File "remove_keywords.py", line 25, in main
result = ad_group_criterion_service.mutate(operations)
File "/usr/local/lib/python3.5/dist-packages/googleads/common.py", line
617, in MakeSoapRequest
for arg in args])
File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 521,
in __call__
return client.invoke(args, kwargs)
File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 581,
in invoke
result = self.send(soapenv)
File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 619,
in send
description=tostr(e), original_soapenv=original_soapenv)
File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 670,
in process_reply
raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault:
'[OperationAccessDenied.ACTION_NOT_PERMITTED @ class
com.google.ads.api.serviceimpls.campaignmgmt.criterion.adgroupcriterion.Mu]'
How can I solve this?
Many thanks
Emanuele Sacco
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/6ec4b5bb-6163-4153-8af7-b8751ef4e8e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.