BatchJobProcessingError.FILE_FORMAT_ERROR for adding incremental negative keywords

58 views
Skip to first unread message

Emily Fox

unread,
Jul 26, 2017, 3:53:14 AM7/26/17
to AdWords API Forum
I'm getting the a processing error

Processing error [0]: errorType=BatchJobProcessingError, trigger=, errorString=BatchJobProcessingError.FILE_FORMAT_ERROR, fieldPath=, reason=FILE_FORMAT_ERROR



My code looks similar, I've been playing around with it to see if I can get it to work but what I currently have (which still returns the error) is the following

        $chunks = array_chunk($operations, self::MODIFIERS_PER_BATCH);
    $len = count($chunks);

    for ($i = 0; $i < $len; $i++) {
        //if first chunk
        if ($i == 0) {
            $batchJobUploadStatus = $batchJobs->uploadIncrementalBatchJobOperations(
                [],
                new BatchJobUploadStatus($this->uploadUrl, $this->sess)
           );
        //everything in the middle
        } else {
           $batchJobUploadStatus = $batchJobs->uploadIncrementalBatchJobOperations(
               [],
               $batchJobUploadStatus
            );
        }

        //if last chunk, close the upload
        if ($i == ($len - 1)) {
            $batchJobs->closeIncrementalUpload($batchJobUploadStatus);
        }
    }


Any help would be greatly appreciated

Peter Oliquino

unread,
Jul 26, 2017, 4:54:04 AM7/26/17
to AdWords API Forum
Hi Emily,

The BatchJobProcessingError.FILE_FORMAT_ERROR indicates that there might be some issues with your input file. Could you check if the request body is similar to the BatchJobOpsService.wsdl and if you have met the upload requirements as discussed here? Let me know if you still encounter issues after reviewing the references and applying any required changes in your request. You may also send to me privately, via Reply privately to author, your clientCustomerId and the batch job Ids if you still encounter any errors.

Thanks and regards,
Peter
AdWords API Team

Emily Fox

unread,
Jul 26, 2017, 12:37:51 PM7/26/17
to AdWords API Forum
Thanks Peter.

Turns out the issue was me being an idiot :'D 

I was passing through an empty array instead of the operations (an error I made when updating the adwords API to the latest version)

Peter Oliquino

unread,
Jul 26, 2017, 11:28:02 PM7/26/17
to AdWords API Forum
Hi Emily,

Glad to hear that you were able to identify the issue and continue with your development. Feel free to write us back if you encounter any other issues.

Cheers,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages