Internal error while polling for batch job

255 views
Skip to first unread message

Justin Knight

unread,
Mar 17, 2022, 6:07:42 AM3/17/22
to Google Ads API and AdWords API Forum
Hi,
we're using API v10 via the python client library 15.0.0

We received the exception below while waiting for batch job completion.
Previous polls waiting for completion completed successfuly, I've included the last one at the top of log below.

We're using the following code to wait for the response:
        loop = asyncio.get_event_loop()

        def _done_callback(future):
            # The operations_response object will call callbacks from a daemon
            # thread so we must use a threadsafe method of setting the event here
            # otherwise it will not trigger the awaiting code.
            loop.call_soon_threadsafe(event.set)

        # operations_response represents a Long-Running Operation or LRO. The class
        # provides an interface for polling the API to check when the operation is
        # complete. Below we use the asynchronous interface, but there's also a
        # synchronous interface that uses the Operation.result method.
        operations_response.add_done_callback(_done_callback)

Log with exception trace

INFO:google.ads.googleads.client:Request made: ClientCustomerId: None, Host: googleads.googleapis.com, Method: /google.longrunning.Operations/GetOperation, RequestId: SVR42VN784ndnPUCkK3tqg, IsFault: False, FaultMessage: None

Request made: ClientCustomerId: None, Host: googleads.googleapis.com, Method: /google.longrunning.Operations/GetOperation, RequestId: SVR42VN784ndnPUCkK3tqg, IsFault: False, FaultMessage: None  

INFO:google.ads.googleads.client:Request
-- ------- Method: /google.longrunning.Operations/GetOperation Host: googleads.googleapis.com Headers: { "developer-token": "REDACTED", "login-customer-id": "7853886294", "x-goog-api-client": "gl-python/3.8.12 grpc/1.42.0 gax/2.6.1", "x-goog-request-params": "name=customers/2223613230/operations/CiljdXN0b21lcnMvMjIyMzYxMzIzMC9iYXRjaEpvYnMvODQ4NTYzNDYxNBAK" } Request: name: "customers/2223613230/operations/CiljdXN0b21lcnMvMjIyMzYxMzIzMC9iYXRjaEpvYnMvODQ4NTYzNDYxNBAK" Response ------- Headers: { "request-id": "78CWzOaafxV2SVi9crXNtw" } Fault: { "created": "@1647448680.993121093", "description": "Error received from peer ipv4:74.125.193.95:443", "file": "src/core/lib/surface/call.cc", "file_line": 1063, "grpc_message": "Internal error encountered.", "grpc_status": 13 } WARNING:google.ads.googleads.client:Request made: ClientCustomerId: None, Host: googleads.googleapis.com, Method: /google.longrunning.Operations/GetOperation, RequestId: 78CWzOaafxV2SVi9crXNtw, IsFault: True, FaultMessage: Internal error encountered. Request ------- Method: /google.longrunning.Operations/GetOperation Host: googleads.googleapis.com Headers: { "developer-token": "REDACTED", "login-customer-id": "7853886294", "x-goog-api-client": "gl-python/3.8.12 grpc/1.42.0 gax/2.6.1", "x-goog-request-params": "name=customers/2223613230/operations/CiljdXN0b21lcnMvMjIyMzYxMzIzMC9iYXRjaEpvYnMvODQ4NTYzNDYxNBAK" } Request: name: "customers/2223613230/operations/CiljdXN0b21lcnMvMjIyMzYxMzIzMC9iYXRjaEpvYnMvODQ4NTYzNDYxNBAK" Response ------- Headers: { "request-id": "78CWzOaafxV2SVi9crXNtw" } Fault: { "created": "@1647448680.993121093", "description": "Error received from peer ipv4:74.125.193.95:443", "file": "src/core/lib/surface/call.cc", "file_line": 1063, "grpc_message": "Internal error encountered.", "grpc_status": 13 } Request made: ClientCustomerId: None, Host: googleads.googleapis.com, Method: /google.longrunning.Operations/GetOperation, RequestId: 78CWzOaafxV2SVi9crXNtw, IsFault: True, FaultMessage: Internal error encountered. Exception in thread Thread-220: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 66, in error_remapped_callable return callable_(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 216, in __call__ response, ignored_call = self._with_call(request, File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 257, in _with_call return call.result(), call File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 343, in result raise self File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 241, in continuation response, call = self._thunk(new_method).with_call( File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 266, in with_call return self._with_call(request, File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 257, in _with_call return call.result(), call File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 343, in result raise self File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 241, in continuation response, call = self._thunk(new_method).with_call( File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 266, in with_call return self._with_call(request, File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 254, in _with_call call = self._interceptor.intercept_unary_unary(continuation, File "/usr/local/lib/python3.8/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 99, in intercept_unary_unary self._handle_grpc_failure(response) File "/usr/local/lib/python3.8/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 71, in _handle_grpc_failure raise self._get_error_from_response(response) File "/usr/local/lib/python3.8/site-packages/grpc/_interceptor.py", line 241, in continuation response, call = self._thunk(new_method).with_call( File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 957, in with_call return _end_unary_response_blocking(state, call, True, None) File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.INTERNAL details = "Internal error encountered." debug_error_string = "{ "created": "@1647448680.993121093", "description": "Error received from peer ipv4:74.125.193.95:443", "file": "src/core/lib/surface/call.cc", "file_line": 1063, "grpc_message": "Internal error encountered.", "grpc_status": 13 }" > During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.8/site-packages/google/api_core/future/polling.py", line 110, in _blocking_poll retry_(self._done_or_raise)(**kwargs) File "/usr/local/lib/python3.8/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func return retry_target( File "/usr/local/lib/python3.8/site-packages/google/api_core/retry.py", line 190, in retry_target return target() File "/usr/local/lib/python3.8/site-packages/google/api_core/future/polling.py", line 88, in _done_or_raise if not self.done(**kwargs): File "/usr/local/lib/python3.8/site-packages/google/api_core/operation.py", line 170, in done self._refresh_and_update(retry) File "/usr/local/lib/python3.8/site-packages/google/api_core/operation.py", line 158, in _refresh_and_update self._operation = self._refresh(retry=retry) File "/usr/local/lib/python3.8/site-packages/google/api_core/operations_v1/operations_client.py", line 142, in get_operation return self._get_operation( File "/usr/local/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 154, in __call__ return wrapped_func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/google/api_core/retry.py", line 283, in retry_wrapped_func return retry_target( File "/usr/local/lib/python3.8/site-packages/google/api_core/retry.py", line 190, in retry_target return target() File "/usr/local/lib/python3.8/site-packages/google/api_core/timeout.py", line 210, in func_with_timeout return func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 68, in error_remapped_callable raise exceptions.from_grpc_error(exc) from exc File "/usr/local/lib/python3.8/site-packages/google/api_core/exceptions.py", line 592, in from_grpc_error if isinstance(rpc_exc, grpc.Call) or _is_informative_grpc_error(rpc_exc): AttributeError: 'NoneType' object has no attribute 'Call'

Google Ads API Forum Advisor

unread,
Mar 17, 2022, 4:22:18 PM3/17/22
to jus...@search-machines.com, adwor...@googlegroups.com
Hi Justin,

Thanks for sharing this with us. Please allow me to share this with our team and we will provide an update shortly.

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2YonXi:ref

Ngon Nguyen

unread,
Mar 17, 2022, 8:12:49 PM3/17/22
to jus...@search-machines.com, Google Ads API and AdWords API Forum
Chào mừng bạn đến với bảng nhớ tạm của Gboard, bất kỳ văn bản nào bạn sao chép sẽ được lưu tại đây.Sử dụng biểu tượng chỉnh sửa để ghim, thêm hoặc xóa đoạn.Nhấn vào một đoạn để dán vào hộp văn bản.Chạm và giữ một đoạn để ghim đoạn đó. Các đoạn đã bỏ ghim sẽ bị xóa sau 1 giờ.

Vào 17:07, Th 5, 17 thg 3, 2022 Justin Knight <jus...@search-machines.com> đã viết:
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@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 "Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ad2515b9-c63d-4e95-a484-870736e0cf31n%40googlegroups.com.

Justin Knight

unread,
Mar 23, 2022, 5:30:54 AM3/23/22
to Google Ads API and AdWords API Forum
Hi Matt,
thanks for sharing with your team, do you have any update on this?

Kind regards,
Justin.

Message has been deleted
Message has been deleted

Google Ads API Forum Advisor

unread,
May 9, 2022, 2:04:02 PM5/9/22
to jus...@search-machines.com, adwor...@googlegroups.com
Hi Justin,

Thank you for reaching out.

An internal_error could be caused when something unexpected happened while processing the request.  To investigate the issue further, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


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