BatchJobService.FILE_FORMAT_ERROR on CampaignOperations

45 views
Skip to first unread message

fol...@brainlabsdigital.com

unread,
Apr 27, 2016, 12:26:27 PM4/27/16
to AdWords API Forum
Hi, 

I have a problem using the BatchJobService. 

My environment is Python3.5 and I am using the latest version of googleads, and accessing the API version v201603

I am trying to perform a series of campaign operations using the batch job service, here is my code. 


def upload_batch_operations(self, batch_job, operations, func=None):


        batch_job_helper
= self.client.GetBatchJobHelper()


       
# Retrieve the URL used to upload the BatchJob operations.
        upload_url
= batch_job['uploadUrl']['url']
        batch_job_id
= batch_job['id']


        incremental_uploader
= batch_job_helper.GetIncrementalUploadHelper(upload_url)
       
# batch_job_helper.UploadOperations(upload_url, operations)
        incremental_uploader
.UploadOperations([operations], is_last=True)


I have tried using both the UploadOperations functions from the incremental and normal function (commented out above)

For creation of the operations -->


def campaign_status_operations(self, campaign_ids, status):

       
# Construct operations and update campaign.
        operations
= [{
           
'xsi_type': 'CampaignOperation',
           
'operator': 'SET',
           
'operand': {
               
'id': campaign_id,
               
'status': status,
           
}
       
} for campaign_id in campaign_ids if campaign_ids]

       
return operations


I have executed this code successfully several times in the past using version v201506, up until this month.

Was a lot changed in the new version that could cause this file format error?

I am not even uploading a file.

Thanks,

Bo

Yin Niu

unread,
Apr 27, 2016, 12:42:17 PM4/27/16
to AdWords API Forum
Hi Bo, 

Could you please send the SOAP request and response logs so that we could investigate further? Just click Reply privately to author in the forum when responding. 

Thanks,
Yin, AdWords API Team. 

fol...@brainlabsdigital.com

unread,
Apr 28, 2016, 6:21:37 AM4/28/16
to AdWords API Forum
Hi Yin, 

I have sent you a private response but I don't know how to view and confirm it's sent. 

Please let me know if you received it. 

Thanks

Bo
Reply all
Reply to author
Forward
0 new messages