Hi, I'm struggling to update headlines in an existing asset group,
belonging to a perf max campaign. I need to replace those which have a
"Low" performance label. I don't know if I should first delete the
headlines I want to replace and then create the new ones. This is what I
tried and the error:
googleads_service = self.get_service("GoogleAdsService")
asset_group_service = self.get_service("AssetGroupService")
headlines_resource_names = self._create_multiple_text_assets(account_id,
asset_list)
asset_group_asset_operation = self.get_type("AssetGroupAssetOperation")
asset = asset_group_asset_operation.update
asset.resource_name = asset_group_service.asset_group_path(account_id,
asset_group_id)
operations = []
for resource_name in headlines_resource_names:
mutate_operation = self.get_type("MutateOperation")
asset_group_asset =
mutate_operation.asset_group_asset_operation.create
asset_group_asset.field_type =
self.get_type('AssetFieldTypeEnum').AssetFieldType.HEADLINE
asset_group_asset.asset_group = asset.resource_name
asset_group_asset.asset = resource_name
operations.append(mutate_operation)
fm = protobuf_helpers.field_mask(None, asset._pb)
asset_group_asset_operation.update_mask.CopyFrom(fm)
for operation in operations:
ad_group_ad_response = googleads_service.mutate(
customer_id=str(account_id), mutate_operations=[operation]
)
And this is the error I received:
Method: /google.ads.googleads.v10.services.GoogleAdsService/Mutate
Host: googleads.googleapis.com
Headers: {
"developer-token": "REDACTED",
"login-customer-id": "4128782957",
"x-goog-api-client": "gl-python/3.7.3 grpc/1.46.1 gax/2.7.1 gccl/16.0.0",
"x-goog-request-params": "customer_id=1489840023"
}
Request: customer_id: "1489840023"
mutate_operations {
asset_group_asset_operation {
create {
asset_group: "customers/1489840023/assetGroups/6442638580"
asset: "customers/1489840023/assets/40299149686"
field_type: HEADLINE
}
}
}
Response
-------
Headers: {
"google.ads.googleads.v10.errors.googleadsfailure-bin":
"\n\u0002\n\u0003\u0003\n\u0012\u0001This request would exceed a limit on
the number of allowed resources. The details of which type of limit was
exceeded will eventually be returned in
ErrorDetails.\u001a.*,ENABLED_HEADLINE_ASSET_LINKS_PER_ASSET_GROUP\"6\u0012\u0015\n\u0011mutate_operations\u0018\u0000\u0012\u001d\n\u001basset_group_asset_operation*\u0014*\u0012\n\n6442638580\u0010\u0005\u0018\u0001
\u0005\u0012\u0016AMCFKOLBRmtNwl3g6rZaBA",
"grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid
argument.\u001a\u0003\nDtype.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure\u0012\u0002\n\u0002\n\u0003\u0003\n\u0012\u0001This
request would exceed a limit on the number of allowed resources. The
details of which type of limit was exceeded will eventually be returned in
ErrorDetails.\u001a.*,ENABLED_HEADLINE_ASSET_LINKS_PER_ASSET_GROUP\"6\u0012\u0015\n\u0011mutate_operations\u0018\u0000\u0012\u001d\n\u001basset_group_asset_operation*\u0014*\u0012\n\n6442638580\u0010\u0005\u0018\u0001
\u0005\u0012\u0016AMCFKOLBRmtNwl3g6rZaBA",
"request-id": "AMCFKOLBRmtNwl3g6rZaBA"
}
Fault: errors {
error_code {
resource_count_limit_exceeded_error: RESOURCE_LIMIT
}
message: "This request would exceed a limit on the number of allowed
resources. The details of which type of limit was exceeded will eventually
be returned in ErrorDetails."
trigger {
string_value: "ENABLED_HEADLINE_ASSET_LINKS_PER_ASSET_GROUP"
}
location {
field_path_elements {
field_name: "mutate_operations"
index: 0
}
field_path_elements {
field_name: "asset_group_asset_operation"
}
}
details {
resource_count_details {
enclosing_id: "6442638580"
limit: 5
limit_type: UNKNOWN
existing_count: 5
}
}
}
request_id: "AMCFKOLBRmtNwl3g6rZaBA"
WARNING:google.ads.googleads.client:Request made: ClientCustomerId:
1489840023, Host: googleads.googleapis.com, Method:
/google.ads.googleads.v10.services.GoogleAdsService/Mutate, RequestId:
AMCFKOLBRmtNwl3g6rZaBA, IsFault: True, FaultMessage: This request would
exceed a limit on the number of allowed resources. The details of which
type of limit was exceeded will eventually be returned in ErrorDetails.
Request with ID "AMCFKOLBRmtNwl3g6rZaBA" failed with status
"INVALID_ARGUMENT" and includes the following errors:
Error with message "This request would exceed a limit on the number
of allowed resources. The details of which type of limit was exceeded will
eventually be returned in ErrorDetails.".
On field: mutate_operations
On field: asset_group_asset_operation
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/22e503a0-4b92-41d2-8c0f-b5d03971c010n%40googlegroups.com.