I found this pull request 
<https://github.com/googleads/google-ads-python/pull/165/files> with usage 
of listing group tree in Python.
After fixing the code (in several cases wrong variables were used for some 
reason) I was able to successfully create listing tree.

The odd thing is, I compared generated protobuf messages with the ones I've 
been generating in my own code and they are identical (at least their 
string representations are) but nevertheless my code continues to throw the 
errors and the modified code from the pull request works just fine.

I am trying to figure out the difference now... Just wanted you to know 
that the protobuf messages seem to be correct (at least the ones with the 
`listing_brand` case_value)

On Tuesday, August 27, 2019 at 1:28:44 PM UTC+3, Inilien Inilien wrote:
>
>  Hi Ben.
>
> You wrote:
>
>  Have you tried calling SetInParent on case_value directly? For example: 
>> ad_group_criterion.listing_group.case_value.SetInParent()
>
> Actually, not. I used ClearField - I was modifying my protobuf messages 
> from my very first post in this thread. But it is my understanding that it 
> doesn't matter how the protobuf message was created as long as it has the 
> correct contents. You can see the result of an empty `case_value` in this 
> message from me (which I posted earlier in my previous message) 
> https://groups.google.com/forum/#!msg/adwords-api/MKoKH8xVn-k/0q3JVm2nAgAJ 
> look 
> for *attempt 2*. (there are 3 attempts. For each I provided input 
> protobuf messages and errors which I am getting as a result. But some code 
> blocks are hidden by default for some reason. Look for `- show quoted 
> text -` to show them. 
>
>
>  My advice was to resolve the 
>> error LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE, but it does seem that 
>> you were able to overcome that.
>
> No, actually I wasn't. Again, pleas look at my post 
> https://groups.google.com/forum/#!msg/adwords-api/MKoKH8xVn-k/0q3JVm2nAgAJ 
> (same 
> link as above).
> To summarize them again here:
> *attempt 1*: difference with the protobuf messages from my very first 
> post in this thread is that I  removed `index` from 
> `listing_custom_attribute` which resulted in different error, namely that 
> for the case of `listing_custom_attribute` the `index` field is `REQUIRED`
> *attempt 2*:I also tried to remove `listing_custom_attribute` at all 
> (leave `case_value` empty) which resulted in the same error as in my very 
> first post in this thread, namely: `LISTING_GROUP_SUBDIVISION_
> REQUIRES_OTHERS_CASE` for the root node and (I assume as a result of this 
> error) `LISTING_GROUP_DOES_NOT_EXIST` for children nodes.
> *attempt 3*: Here I tried to replace `listing_custom_attribute` with 
> `listing_brand` since that is what Bharani successfully used in his Java 
> code in previous posts 
> <https://groups.google.com/d/msg/adwords-api/MKoKH8xVn-k/tTyy5ZuaAAAJ> and 
> also was used in documentation 
> <https://developers.google.com/google-ads/api/docs/samples/add-shopping-product-listing-group-tree>.
>  
> And as you can see for the `Other` node I used this construction
> case_value {
>   listing_brand {
>   }
> }
> since it was used by Bharani and in Java example. But still I've got the 
> same error `LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE`
>
>
> P.s. I've also tried the protobuf messages with `listing_brand` when 
> `case_value` for `Other` node is empty. In that case I am getting the same 
> errors, namely `LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE`
>
>
> Thank you for trying to help me, but could you please reread previous 
> messages more accurately? It is the second time that I have to post link to 
> my previous message and it takes very long time between responses. 
> Essentially a week has passed since I mention for the second time to 
> Bharani that I am using Python and he asked you to join the discussion. But 
> sadly we haven't made any progress at all.
>
> Oh, and could you please post responses in the Google Group thread? in 
> case someone else will face the same issue it would be better if the hole 
> discussion was in the same place (And I believe that at least gmail 
> formatting of these messages is different from Google Groups' one. Not sure 
> about other email providers)
>
>
> On Tuesday, August 27, 2019 at 12:22:07 PM UTC+3, Inilien Inilien wrote:
>>
>>
>>
>> ---------- Forwarded message ---------
>> From: Google Ads API Forum Advisor Prod <adsapiforumadvi...@gmail.com>
>> Date: Mon, Aug 26, 2019 at 11:05 PM
>> Subject: Re: cannot create shopping ProductGroup tree in one batch. 
>> Getting LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE error
>> To: inil...@gmail.com <inil...@gmail.com>
>>
>>
>> Hi Inilien,
>>
>> I'll respond to your questions inline below: 
>>    
>>    1. My advice was to resolve the 
>>    error LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE, but it does seem 
>> that 
>>    you were able to overcome that. Can you clarify exactly which error 
>> message 
>>    you're currently receiving? There's a few in that chain and I want to 
>> make 
>>    sure I'm addressing the correct error. 
>>    2. SetInParent appears to have the same effect as CopyFrom and may be 
>>    a bit simpler. Have you tried calling SetInParent on case_value directly? 
>>    For example: ad_group_criterion.listing_group.case_value.SetInParent() 
>>    3. That is the correct way to create an operation. 
>>
>> Thank you,
>> Ben, Google Ads API Team
>>  
>>
>>
>> ref:_00D1U1174p._5001UEJA9R:ref
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6b8d84a1-c979-4f3b-84ac-fdd2d81a5e85%40googlegroups.com.

Reply via email to