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
On Wednesday, April 27, 2016 at 5:26:27 PM UTC+1, fol...@brainlabsdigital.com wrote:
On Wednesday, April 27, 2016 at 5:26:27 PM UTC+1, fol...@brainlabsdigital.com wrote:
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 v201603I 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 operationsI 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
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscribe@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+unsubscribe@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/9c73d2ca-f7f4-49f3-826f-b5d143b250a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment