Using the following code to update an ads and the function call returns 
ADGROUP_LIMIT error..

The Python SDK we are using is "google-ads==4.1.1"
<code>
   client = GoogleAdsClient.load_from_storage()
   ad_group_ad_service = client.get_service('AdGroupAdService', 
version='v1')
   ad_group_ad_operation = client.get_type('AdGroupAdOperation', 
version='v1')

   ad_group_ad = ad_group_ad_operation.update
   ad_group_ad.resource_name = 
"customers/REDACTED/adGroupAds/REDACTED~REDACTED"
   ad_group_ad.status = client.get_type('AdGroupStatusEnum', 
version='v1').ENABLED
   fm = protobuf_helpers.field_mask(None, ad_group_ad)
   ad_group_ad_operation.update_mask.CopyFrom(fm)

   response = ad_group_ad_service.mutate_ad_group_ads(customer_id, 
[ad_group_ad_operation])
</code>

The following are the log message and exception from the above function 
call:

Request
-------
Method: /google.ads.googleads.v1.services.AdGroupAdService/MutateAdGroupAds
Host: googleads.googleapis.com:443
Headers: {
  "developer-token": "*REDACTED*",
  "x-goog-api-client": "gl-python/3.8.1 grpc/1.26.0 gax/1.16.0 gapic/4.1.1"
}
Request: customer_id: "*REDACTED*"
operations {
  update {
    resource_name: "customers/*REDACTED*/adGroupAds/*REDACTED*~*REDACTED*"
    status: ENABLED
  }
  update_mask {
    paths: "resource_name"
    paths: "status"
  }
}


Response
-------
Headers: {
  "google.ads.googleads.v1.errors.googleadsfailure-bin": 
"\n\u0002\n\u0003\u0003\u0004\u0012\u0001Indicates that this request would 
exceed the number of allowed resources in an ad group. The exact resource 
type and limit being checked can be inferred from accountLimitType, and the 
numeric id of the ad group involved is given by 
enclosingId.\u001a\b*\u0006<null>\"\u0010\u0012\u000e\n\noperations\u0012\u0000",
  "grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid 
argument.\u001a\u0002\nCtype.googleapis.com/google.ads.googleads.v1.errors.GoogleAdsFailure\u0012\u0002\n\u0002\n\u0003\u0003\u0004\u0012\u0001Indicates
 
that this request would exceed the number of allowed resources in an ad 
group. The exact resource type and limit being checked can be inferred from 
accountLimitType, and the numeric id of the ad group involved is given by 
enclosingId.\u001a\b*\u0006<null>\"\u0010\u0012\u000e\n\noperations\u0012\u0000",
  "request-id": "*REDACTED*"
}
Fault: errors {
  error_code {
    resource_count_limit_exceeded_error: ADGROUP_LIMIT
  }
  message: "Indicates that this request would exceed the number of allowed 
resources in an ad group. The exact resource type and limit being checked 
can be inferred from accountLimitType, and the numeric id of the ad group 
involved is given by enclosingId."
  trigger {
    string_value: "<null>"
  }
  location {
    field_path_elements {
      field_name: "operations"
      index {
      }
    }
  }
}

What does the error code mean? Which resource does it refer to? Is this 
AdGroup contains too many ads? What is the limit?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/7d34228d-456d-4002-b6ce-885838c332ae%40googlegroups.com.

Reply via email to