Updating Campaign Budget Issue: "Cannot use empty field mask in update operation."

411 views
Skip to first unread message

Toprak Ucar

unread,
Feb 17, 2022, 10:56:10 AM2/17/22
to Google Ads API and AdWords API Forum
Hello Everyone,

I am facing an issue while I try to update a campaign budget as below;

Error with message "Cannot use empty field mask in update operation.".
                On field: operations


My code:

client = GoogleAdsClient.load_from_dict(credentials, version='v10')

campaign_budget_service = client.get_service("CampaignBudgetService")
campaign_budget_operation = client.get_type("CampaignBudgetOperation")

campaign_budget = campaign_budget_operation.update
campaign_budget.delivery_method = (
    client.enums.BudgetDeliveryMethodEnum.STANDARD
)
campaign_budget.id = 1122334455
campaign_budget.explicitly_shared = False
campaign_budget.resource_name = "customers/12345678/campaignBudgets/1122334455"
campaign_budget.amount_micros = int(22.22 * (10 ** 6))

try:
    campaign_budget_response = (
        campaign_budget_service.mutate_campaign_budgets(
            customer_id=customer_id, operations=[campaign_budget_operation]
        )
    )
except GoogleAdsException as ex:
    _handle_googleads_exception(ex)

Regards




Google Ads API Forum Advisor

unread,
Feb 18, 2022, 9:30:49 AM2/18/22
to top...@armis.tech, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

To investigate the issue further, could you please provide us with the complete logs (request and response with request-id) via the Reply privately to the author option?

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Wwfji:ref
Reply all
Reply to author
Forward
0 new messages