Re: Cannot create a budget proposal that overlaps with an pending budget proposal or an approved budget.

2019-09-17 Thread 蓝瀚
Hi Sai ,

Thanks for your replying, It helped

adsapiforumadvisor於 2019年9月17日星期二 UTC+8上午2時54分54秒寫道:
>
> Hello,
>
> Since you have an existing budget with unlimited end date it is not 
> letting you to add another budget. While creating a new budget, start-date 
> and end-data should not overlap with the existing account budgets stat and 
> end-dates. The new budget should be created after the end date of the 
> existing budget in general. Hope this helps, please let me know if you have 
> any further questions.
>
> Regards,
> Sai Teja, Google Ads API Team
>
> ref:_00D1U1174p._5001UHGt0n: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/a9ecd22d-75e2-406e-b24d-4345b8f2c55b%40googlegroups.com.


RE: Cannot create a budget proposal that overlaps with an pending budget proposal or an approved budget.

2019-09-16 Thread Google Ads API Forum Advisor Prod
Hello,

Since you have an existing budget with unlimited end date it is not letting you 
to add another budget. While creating a new budget, start-date and end-data 
should not overlap with the existing account budgets stat and end-dates. The 
new budget should be created after the end date of the existing budget in 
general. Hope this helps, please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team
ref:_00D1U1174p._5001UHGt0n: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/HzvE90PXXTV300pc5rznWURlWkjEwNB19wDg%40sfdc.net.


Cannot create a budget proposal that overlaps with an pending budget proposal or an approved budget?

2019-09-16 Thread 蓝瀚
I'm tring to create a new account budget for a google-ads account  followed 
google-ads-api's guide 

from __future__ import absolute_import

import argparse
import sys
import os
import six

import google.ads.google_ads.client


os.environ['https_proxy'] = 'https_proxy'

GG_DEVELOP_TOKEN = "GG_DEVELOP_TOKEN"


credentials_dict_lb = {"token_uri": "https://oauth2.googleapis.com/token;, 
"token": None, "scopes": ["https://www.googleapis.com/auth/adwords;,

 "https://www.googleapis.com/auth/userinfo.profile;, 
"https://www.googleapis.com/auth/userinfo.email;, "openid"],

 "client_id": "client_id", 

"refresh_token": "refresh_token", "client_secret": "client_secret"}



def main(client, customer_id, billing_setup_id):
account_budget_proposal_service = client.get_service(
'AccountBudgetProposalService')
billing_setup_service = client.get_service('BillingSetupService',
   version='v2')


account_budget_proposal_operation = client.get_type(
'AccountBudgetProposalOperation')
proposal = account_budget_proposal_operation.create

proposal.proposal_type = client.get_type(
'AccountBudgetProposalTypeEnum').CREATE
proposal.billing_setup.value = billing_setup_service.billing_setup_path(
customer_id, billing_setup_id)
proposal.proposed_name.value = 'Account Budget Proposal (example)'

# Specify the account budget starts immediately
proposal.proposed_start_time_type = client.get_type('TimeTypeEnum',
version='v2').NOW
# Alternatively you can specify a specific start time. Refer to the
# AccountBudgetProposal resource documentation for allowed formats.
#
# proposal.proposed_start_date_time = '2020-01-02 03:04:05'

# Specify that the budget runs forever
proposal.proposed_end_time_type = client.get_type('TimeTypeEnum',
  version='v2').FOREVER
# Alternatively you can specify a specific end time. Allowed formats are as
# above.
#
# proposal.proposed_end_date_time = '2021-01-02 03:04:05'

# Optional: set notes for the budget. These are free text and do not effect
# budget delivery.
#
# proposal.proposed_notes = client.wrapper
# .string('Received prepayment of $0.01')
proposal.proposed_spending_limit_micros.value = 0

try:
account_budget_proposal_response = (
  account_budget_proposal_service.mutate_account_budget_proposal(
  customer_id, account_budget_proposal_operation))

except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
  'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('\tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('\t\tOn field: %s' % field_path_element.field_name)
sys.exit(1)

print('Created account budget proposal "%s".'
  % account_budget_proposal_response.result.resource_name)


if __name__ == '__main__':
# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
credentials = google.oauth2.credentials.Credentials(**credentials_dict_lb)
client = google.ads.google_ads.client.GoogleAdsClient(credentials, 
GG_DEVELOP_TOKEN, login_customer_id='1871151278')


parser = argparse.ArgumentParser(
description='Creates an account budget proposal.')
# The following argument(s) should be provided to run the example.
parser.add_argument('-c', '--customer_id', type=six.text_type,
required=True, help='The Ads customer ID.')
parser.add_argument('-b', '--billing_setup_id', type=six.text_type,
required=True, help='The billing setup ID.')
args = parser.parse_args()

main(client, args.customer_id, args.billing_setup_id)



but got error like below:

Request made: ClientCustomerId: 1135645950, Host: googleads.googleapis.com:
443, Method: /google.ads.googleads.v2.services.AccountBudgetProposalService/
MutateAccountBudgetProposal, RequestId: 7l0JJ7hBfVkKhAGlQjSSgQ, IsFault: 
True, FaultMessage: Cannot create a budget proposal that overlaps with an 
pending budget proposal or an approved budget.
Request with ID "7l0JJ7hBfVkKhAGlQjSSgQ" failed with status 
"INVALID_ARGUMENT" and includes the following errors:
Error with message "Cannot create a budget proposal that overlaps 
with an pending budget proposal or an approved budget.".
On field: operation


My biling setup as :

Billing setup with ID "billing_setup_id ", status "APPROVED", 
payments_account "customers/1135645950/paymentsAccounts/payments_account_id"
, payments_account_id 

Cannot create a budget proposal that overlaps with an pending budget proposal or an approved budget.

2019-09-16 Thread 蓝瀚
When I tring to add a  new account_budget,  I get errors as:

Request made: ClientCustomerId: 1135645950, Host: googleads.googleapis.com:
443, Method: /google.ads.googleads.v2.services.AccountBudgetProposalService/
MutateAccountBudgetProposal, RequestId: DrIf4C2NkOstExv0Mr8qbQ, IsFault: 
True, FaultMessage: Cannot create a budget proposal that overlaps with an 
pending budget proposal or an approved budget.
Request with ID "DrIf4C2NkOstExv0Mr8qbQ" failed with status 
"INVALID_ARGUMENT" and includes the following errors:
Error with message "Cannot create a budget proposal that overlaps 
with an pending budget proposal or an approved budget.".
On field: operation


My billing setup as :

Billing setup with ID "billing_setup_id", status "APPROVED", 
payments_account "customers/1135645950/paymentsAccounts/payments_account_id 
", payments_account_id "payments_account_id", payments_account_name 
"Bluefocus蓝瀚", payments_profile_id "payments_profile_id", 
payments_profile_name "BlueFocus International Limited", 
secondary_payments_profile_id "".


My exist account budget as :

Account budget "customers/1135645950/accountBudgets/account_budget_id", with 
status "APPROVED", billing setup 
"customers/1135645950/billingSetups/billing_setup_id", amount served 0.00, 
total adjustments 0.00, approved spending limit "1.0" (proposed "1.0"), 
approved start time "value: "2019-09-12 18:46:53"
 " (proposed "value: "2019-09-12 18:46:47"
 "), approved end time "" (proposed "").


Why cann't I create a new account_budget ?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/a03dac77-eaea-46b4-b9e5-745318aadff5%40googlegroups.com.