Getting google.api_core.exceptions.Unknown: None Stream removed error when requested data is large

1,943 views
Skip to first unread message

pgao

unread,
Jul 11, 2022, 3:15:09 PM7/11/22
to Google Ads API and AdWords API Forum
Hi,
I'm consistently getting this error when downloading large dataset through search stream. This is through python library.
Here's the exception:
  File "/home/mm/venv/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 90, in __next__
    return next(self._wrapped)
  File "/home/mm/venv/lib/python3.7/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 108, in __next__
    raise e
  File "/home/mm/venv/lib/python3.7/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 105, in __next__
    self._failure_handler(self._underlay_call)
  File "/home/mm/venv/lib/python3.7/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 71, in _handle_grpc_failure
    raise self._get_error_from_response(response)
  File "/home/mm/venv/lib/python3.7/site-packages/google/ads/googleads/interceptors/response_wrappers.py", line 88, in __next__
    message = next(self._underlay_call)
  File "/home/mm/venv/lib/python3.7/site-packages/grpc/_channel.py", line 426, in __next__
    return self._next()
  File "/home/mm/venv/lib/python3.7/site-packages/grpc/_channel.py", line 642, in _next
    return self._next_response()
  File "/home/mm/venv/lib/python3.7/site-packages/grpc/_channel.py", line 617, in _next_response
    raise self
grpc._channel._SingleThreadedRendezvous: <_SingleThreadedRendezvous of RPC that terminated with:
    status = StatusCode.UNKNOWN
    details = "Stream removed"
    debug_error_string = "{"created":"@1657134945.213412560","description":"Error received from peer ipv4:142.250.31.95:443","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Stream removed","grpc_status":2}"
>
The above exception was the direct cause of the following exception:
for batch in stream:
  File "/home/mm/venv/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 93, in __next__
    raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.Unknown: None Stream removed

Google Ads API Forum Advisor

unread,
Jul 11, 2022, 3:20:01 PM7/11/22
to 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 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, you may send the details directly to our googleadsa...@google.com alias instead. Let me know if you have any questions.

Thanks,
Google Logo
Nirmitabahen Gaurav
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cUvqV:ref

pgao

unread,
Jul 13, 2022, 7:15:42 PM7/13/22
to Google Ads API and AdWords API Forum
Hi, any update? I sent the complete request, response and request-id through reply to author option yesterday.

Aarthi Ilangovan

unread,
Jul 29, 2022, 5:32:30 AM7/29/22
to Google Ads API and AdWords API Forum
Hi I am also getting the same error when requested data is large. Can you give us an update on this. 

ERROR which I receive: 
Error received from peer ipv4:10.250.6.128:3128","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"Stream removed","grpc_status":2}"

raise exceptions.from_grpc_error(exc) from exc google.api_core.exceptions.Unknown: None Stream removed



Google Ads API Forum Advisor

unread,
Jul 29, 2022, 7:29:57 AM7/29/22
to aarthi.i...@gdocs.hrs.com, adwor...@googlegroups.com
Hi Aarthi,

Thank you for the reply. I am afraid that this error is specifically in the client library. With this, I can suggest reaching out to the author of this Python client library via this github to get further assistance here as they are more equipped for this concern as also mentioned by my colleagues.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


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