Hello,
Confirming the start date is set to datetime.now() and that it is being
made at the same time as the API request. I have re-run the code several
times and got the same error message. Would you be able to assist me in
where to pull those request and response logs from? Below is the full error
message. Also, just to re-iterate the oddity I was experiencing where I
would receive this error, but if, in the Google Ads UI, I clicked into
billing then selected Link to Existing Setup, and then exited WITHOUT
setting up billing, the next time I ran the code it would work as expected.
[2022-12-09 12:11:41,703 - WARNING] Request made: ClientCustomerId:
5265225717, Host: googleads.googleapis.com, Method:
/google.ads.googleads.v11.services.BillingSetupService/MutateBillingSetup,
RequestId: pz-QrJn0RfhHZnWTn3ygag, IsFault: True, FaultMessage: A start
time in the future cannot be used because there is currently no active
billing setup for this customer.
Traceback (most recent call last):
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/greystar_account_creation/billing_test.py",
line 87, in <module>
billing.setup_billing()
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/greystar_account_creation/billing_test.py",
line 41, in setup_billing
response = billing_setup_service.mutate_billing_setup(
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/google/ads/googleads/v11/services/services/billing_setup_service/client.py",
line 495, in mutate_billing_setup
response = rpc(
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py",
line 142, in __call__
return wrapped_func(*args, **kwargs)
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/google/api_core/grpc_helpers.py",
line 66, in error_remapped_callable
return callable_(*args, **kwargs)
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 247, in __call__
response, ignored_call = self._with_call(request,
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 290, in _with_call
return call.result(), call
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 146, in result
raise self._exception
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 274, in continuation
response, call = self._thunk(new_method).with_call(
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 301, in with_call
return self._with_call(request,
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 290, in _with_call
return call.result(), call
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 146, in result
raise self._exception
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 274, in continuation
response, call = self._thunk(new_method).with_call(
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 301, in with_call
return self._with_call(request,
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/grpc/_interceptor.py",
line 287, in _with_call
call = self._interceptor.intercept_unary_unary(continuation,
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py",
line 99, in intercept_unary_unary
self._handle_grpc_failure(response)
File
"/Users/adamwalters/digible_repos/Paid_Social_Optimizations/venv/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py",
line 71, in _handle_grpc_failure
raise self._get_error_from_response(response)
google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC
that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer
ipv6:%5B2607:f8b0:4009:803::200a%5D:443
{created_time:"2022-12-09T12:11:41.579003-05:00", grpc_status:3,
grpc_message:"Request contains an invalid argument."}"
>, <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer
ipv6:%5B2607:f8b0:4009:803::200a%5D:443
{created_time:"2022-12-09T12:11:41.579003-05:00", grpc_status:3,
grpc_message:"Request contains an invalid argument."}"
>, errors {
error_code {
billing_setup_error: FUTURE_START_TIME_PROHIBITED
}
message: "A start time in the future cannot be used because there is
currently no active billing setup for this customer."
location {
field_path_elements {
field_name: "operation"
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "start_time"
}
}
}
request_id: "pz-QrJn0RfhHZnWTn3ygag"
, 'pz-QrJn0RfhHZnWTn3ygag')
<https://www.facebook.com/digibleinc/>
<https://www.instagram.com/digibleinc/>
<https://www.linkedin.com/company/digibleinc/>
<https://www.tiktok.com/@digibleinc>
Adam Walters
Director of Paid Media
AUTHENTICITY | FOCUS | CURIOSITY | HUMILITY | HAPPINESS
Phone: (317) 840-1645
Email: [email protected]
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If the reader of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited.
On Fri, Dec 9, 2022 at 2:45 AM Google Ads API Forum Advisor
<[email protected]> wrote:
> Hi Adam,
>
> Thanks for reaching out to the Google Ads API Forum.
>
> I can see that you’ve received
> BillingSetupError.FUTURE_START_TIME_PROHIBITED errors. Upon checking the
> details closely that you’ve shared with us, I found that the API request
> contains the start date as datetime.now(). Could you confirm this?
>
>
>
> start_date = datetime.now()
>
> billing_setup.start_date_time = start_date.strftime("%Y-%m-%d %H:%M:%S")
>
> return billing_setup
>
>
>
> Kindly double check your request if you are not setting the future date as
> compared to when the API call was made. To avoid this error, you would need
> to avoid setting a start date in future with respect to API call request
> time.
>
> Also, as a side note, you may double check the latest billing setup ID in
> your request that has a valid start date and end date that doesn’t extend
> beyond its billing setup. Once you confirm it, you may retry your API
> request. Let us know how it goes further. If the error still persists, you
> may provide us with the complete logs in the format of the request
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
> and response
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
> logs along with request-id as seen in their respective links. In addition,
> we recommend you to enable logging to capture complete details if any error
> occurs by navigating to the Client libraries > Your client library (ex
> Python) > Logging documentation, which you can access from this *link*
> <https://developers.google.com/google-ads/api/docs/client-libs>.
>
> Kindly provide the logs to our team via reply privately to the author
> option.
>
> Regards,
> [image: Google Logo]
> Yasar
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2h16Va: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 [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/CAFNyvFeqKuDO1z6vvz5rjyeZHZ%3DuDvVCDkGyggh-fFpzjjYGCw%40mail.gmail.com.