You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Thread-ConsumeBidirectionalStream caught unexpected exception 'NoneType' object has no attribute 'Call' and will exit #309
Thread-ConsumeBidirectionalStream caught unexpected exception 'NoneType' object has no attribute 'Call' and will exit.
Traceback (most recent call last):
File "/root/.local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 106, in __next__
return next(self._wrapped)
File "/root/.local/lib/python3.7/site-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/root/.local/lib/python3.7/site-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Received RST_STREAM with error code 2"
debug_error_string = "{"created":"@1637058210.761422301","description":"Error received from peer ipv4:173.194.210.95:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"Received RST_STREAM with error code 2","grpc_status":13}"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.local/lib/python3.7/site-packages/google/api_core/bidi.py", line 655, in _thread_main
response = self._bidi_rpc.recv()
File "/root/.local/lib/python3.7/site-packages/google/api_core/bidi.py", line 561, in recv
return self._recoverable(self._recv)
File "/root/.local/lib/python3.7/site-packages/google/api_core/bidi.py", line 520, in _recoverable
raise exc
File "/root/.local/lib/python3.7/site-packages/google/api_core/bidi.py", line 504, in _recoverable
return method(*args, **kwargs)
File "/root/.local/lib/python3.7/site-packages/google/api_core/bidi.py", line 558, in _recv
return next(call)
File "/root/.local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 109, in __next__
raise exceptions.from_grpc_error(exc) from exc
File "/root/.local/lib/python3.7/site-packages/google/api_core/exceptions.py", line 532, in from_grpc_error
if isinstance(rpc_exc, grpc.Call) or _is_informative_grpc_error(rpc_exc):
AttributeError: 'NoneType' object has no attribute 'Call'"
Experiencing the same issue recently (was working before), it happens immediately in my case. The stacktrace is:
2022-01-31 00:34:21 INFO google.api_core.bidi Thread-ConsumeBidirectionalStream exiting
2022-01-31 00:34:21 INFO google.cloud.pubsub_v1.subscriber._protocol.leaser Thread-LeaseMaintainer exiting.
2022-01-31 00:34:21 INFO google.cloud.pubsub_v1.subscriber._protocol.heartbeater Thread-Heartbeater exiting.
2022-01-31 00:34:41 INFO google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager RPC termination has signaled streaming pull manager shutdown.
2022-01-31 00:34:41 INFO google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager Observed non-terminating stream error 'NoneType' object has no attribute 'Call'
2022-01-31 00:34:41 INFO google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager Observed non-recoverable stream error 'NoneType' object has no attribute 'Call'
2022-01-31 00:34:41 ERROR google.api_core.bidi Thread-ConsumeBidirectionalStream caught unexpected exception 'NoneType' object has no attribute 'Call' and will exit.
Traceback (most recent call last):
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 106, in __next__
return next(self._wrapped)
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Locally cancelled by application!"
debug_error_string = "None"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/bidi.py", line 655, in _thread_main
response = self._bidi_rpc.recv()
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/bidi.py", line 561, in recv
return self._recoverable(self._recv)
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/bidi.py", line 520, in _recoverable
raise exc
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/bidi.py", line 504, in _recoverable
return method(*args, **kwargs)
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/bidi.py", line 558, in _recv
return next(call)
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 109, in __next__
raise exceptions.from_grpc_error(exc) from exc
File "/opt/atlassian/pipelines/agent/build/discovery-client/.tox/py38-bravado11-googleoauth04/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'
Activity
parthea commentedon Nov 17, 2021
Hi @orby,
Please could you share sample code to help reproduce the issue?
orby commentedon Nov 18, 2021
Hi @parthea
Source code to reproduce: https://gist.github.com/orby/30c72d3e05f7022fd02f47f91e0b2acc
The unexpected exception happens after 30 minutes.
liu-du commentedon Jan 31, 2022
Hi,
Experiencing the same issue recently (was working before), it happens immediately in my case. The stacktrace is:
atulep commentedon Feb 9, 2022
@liu-du Can you post your code and Google dependencies? Similar to what @orby did above.