Re: heterogeneous operands withing a batchjoboperation

2019-01-08 Thread 'Bharani Cherukuri (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello Michele,

Your input parameters looks fine to me. The FILE_FORMAT_ERROR 

 occurs 
when the entire batch upload request is not formed correctly or does not 
meet the upload requirements listed here 
.
 
Could you please enable the logging 

 and 
share the SOAP logs of the upload operation? That will help in 
troubleshooting the issue. You can *reply privately to author* while 
sharing the logs.

Regards,
Bharani, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/f24d1177-a666-4b3d-a5d0-2e39e9d3467c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


heterogeneous operands withing a batchjoboperation

2019-01-08 Thread michele
Hello,

I have this very simple code building up some operands to be sent off with 
a batchjob:

for adgroup_ad in adgroup_ads:
adgroup_id = adgroup_ad.adgroup.adgroup_id
ad_id = adgroup_ad.ad_id
status_changes.append({
'xsi_type': 'AdGroupAdOperation',
'operator': 'SET',
'operand': {
'xsi_type': 'AdGroupAd',
'adGroupId': adgroup_id,
'ad': {
'id': ad_id,
},
'status': new_status
}
})
if added_labels:
for label in added_labels:
label_changes.append({
'xsi_type': 'AdGroupAdLabelOperation',
'operator': 'ADD',
'operand': {
'xsi_type': 'AdGroupAdLabel',
'adGroupId': adgroup_id,
'adId': ad_id,
'labelId': label
}
})
return status_changes + label_changes


Both the lists work fine on their own, but if I try to submit them together 
the process fails with a generic 
: [{u'error_type': BatchJobProcessingError, 'reason': 
FILE_FORMAT_ERROR, 'trigger': None, u'field_path': None, 'error_string': 
BatchJobProcessingError.FILE_FORMAT_ERROR}] 

So my question is: is it possible to perform different type of operations 
with a single batch?
The answer doesn't seem evident at all in the documentation..

Thanks!

-- 
This email is private and confidential. If you have received this email in 
error, please notify the sender and delete all copies (including any 
attachments) from your system. In such circumstances, you must not make any 
use of this email or its contents. Thanks. 
By sending emails to us we will 
process your personal data. To find out more, please read our Privacy 
Policy . Precis Digital AB. is a 
company registered in Sweden. Registered number: 556889-3324. Registered 
office: Alströmergatan 20A, 112 47 Stockholm, Sweden. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/069e2c5d-bcb9-4d10-9020-63b4f848b855%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.