Hi,

I'm getting the following error: Listing Group UNIT node cannot have 
children

Here's the python code:

_TEMPORARY_ID_LISTING_GROUP_ROOT = -1
operations = []

create_operation_factory = (
        AssetGroupListingGroupFilterCreateOperationFactory(
            client,
            customer_id,
            asset_group_id,
            _TEMPORARY_ID_LISTING_GROUP_ROOT,
        )
    )




new_dimension = client.get_type("ListingGroupFilterDimension")
new_dimension.product_condition.condition = (
    client.enums.ListingGroupFilterProductConditionEnum.NEW
)
operations.append(
    create_operation_factory.create_subdivision(
        '7914047195',#root id according to asset_group_listing_group_filter 
report (api call)
        create_operation_factory.next_id(),
        new_dimension,
    )
)
response = googleads_service.mutate(
        customer_id=customer_id, mutate_operations=operations
    )


Then note the current tree:

[image: pmax root product group.png]

As you can see, I'm working with the root node so should be able to add 
children.

I'm using create_subdivision here but I've tried create_unit too.

Here's where I'm referencing those methods 
from: 
https://github.com/googleads/google-ads-python/blob/1c01c5efaa4bc6edfe5bfa441cce487f3a3f850f/examples/shopping_ads/add_performance_max_product_listing_group_tree.py#L326-L452

I thought the issue might be the wrong parent_id provided to the 
create_subdivision method (7914047195) but it's the only one available.

Thanks in advance.

Charles


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/01f5c38e-c52f-4ac5-93ae-78e481379089n%40googlegroups.com.

Reply via email to