This repository was archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Sample test test_track_objects_streaming failing with "Stream removed" #323
Copy link
Copy link
Closed
Labels
api: videointelligenceIssues related to the googleapis/python-videointelligence API.Issues related to the googleapis/python-videointelligence API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The sample test test_track_objects_streaming has started failing with google.api_core.exceptions.Unknown: None Stream removed
Stack Trace
=================================== FAILURES ===================================
_________________________ test_track_objects_streaming _________________________
self = <google.api_core.grpc_helpers._StreamingResponseIterator object at 0x7f574c0e54d0>
def __next__(self):
"""Get the next response from the stream.
Returns:
protobuf.Message: A single response from the stream.
"""
try:
if hasattr(self, "_stored_first_result"):
result = self._stored_first_result
del self._stored_first_result
return result
> return next(self._wrapped)
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/grpc_helpers.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Stream removed"
debug...<REDACTED>:443","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Stream removed","grpc_status":2}"
>
def __next__(self):
> return self._next()
.nox/py-3-7/lib/python3.7/site-packages/grpc/_channel.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Stream removed"
debug...<REDACTED>:443","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Stream removed","grpc_status":2}"
>
def _next(self):
with self._state.condition:
if self._state.code is None:
event_handler = _event_handler(self._state,
self._response_deserializer)
self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler)
if not operating:
self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
return (self._state.response is not None or
(cygrpc.OperationType.receive_message
not in self._state.due and
self._state.code is not None))
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
response = self._state.response
self._state.response = None
return response
elif cygrpc.OperationType.receive_message not in self._state.due:
if self._state.code is grpc.StatusCode.OK:
raise StopIteration()
elif self._state.code is not None:
> raise self
E grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
E status = StatusCode.UNKNOWN
E details = "Stream removed"
E debug_error_string = "{"created":"@1651769761.524382572","description":"Error received from peer ipv4:<REDACTED>:443","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Stream removed","grpc_status":2}"
E >
.nox/py-3-7/lib/python3.7/site-packages/grpc/_channel.py:826: _MultiThreadedRendezvous
The above exception was the direct cause of the following exception:
capsys = <_pytest.capture.CaptureFixture object at 0x7f574c39f0d0>
video_path = '/tmp/pytest-of-kbuilder/pytest-0/video0/file.mp4'
@pytest.mark.slow
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_track_objects_streaming(capsys, video_path):
> beta_snippets.track_objects_streaming(video_path)
beta_snippets_test.py:102:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
beta_snippets.py:396: in track_objects_streaming
for response in responses:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <google.api_core.grpc_helpers._StreamingResponseIterator object at 0x7f574c0e54d0>
def __next__(self):
"""Get the next response from the stream.
Returns:
protobuf.Message: A single response from the stream.
"""
try:
if hasattr(self, "_stored_first_result"):
result = self._stored_first_result
del self._stored_first_result
return result
return next(self._wrapped)
except grpc.RpcError as exc:
# If the stream has already returned data, we cannot recover here.
> raise exceptions.from_grpc_error(exc) from exc
E google.api_core.exceptions.Unknown: None Stream removed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: videointelligenceIssues related to the googleapis/python-videointelligence API.Issues related to the googleapis/python-videointelligence API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.