Fix/Troublshooting PolicyViolationError during BatchUpload

11 views
Skip to first unread message

adword...@fortnine.ca

unread,
Aug 28, 2018, 11:44:04 PM8/28/18
to AdWords API and Google Ads API Forum
Hello,

I'm batch uploading 1000s of ads. I'm running into a policy error:

Operation 221 - FAILURE:
errorType=PolicyViolationError
trigger=None
errorString=AdPolicyError.POLICY_ERROR
fieldPath=operations[221].operand.ad.headlinePart1
Traceback (most recent call last):
  File "create-text-ads.py", line 75, in <module>
    campaign_batch_upload.PrintResponse(batch_job_helper, response)
  File "/Users/****/Projects/adwords-management/campaign_batch_upload.py", line 302, in PrintResponse
    print ('\treason=%s' % data['errorList']['errors']['reason'])
KeyError: 'reason'


I have two questions:

1) How can I get more information on this error (ex: what headline text is causing it)?
2) Can I make the batch process skip the failed opperation? 

Dannison Yao (AdWords API Team)

unread,
Aug 29, 2018, 4:32:59 AM8/29/18
to AdWords API and Google Ads API Forum
Hi,

To get more information about your error, I suggest you enable logging in your client library by following this guide. After enabling logging, you could rerun the service and investigate the logs generated. Also, could you provide the complete SOAP request and response logs I could investigate further on my end? You may reply via Reply privately to author.

According to this guide, the batch jobs automatically sets the partialFailure tag to TRUE. This means that when an operation fails it returns the error at the end without disrupting the other operations.

Regards,
Dannison
AdWords API Team
Reply all
Reply to author
Forward
0 new messages