googleapis / python-api-core

https://googleapis.dev/python/google-api-core/latest
Apache License 2.0
112 stars 81 forks source link

"Thread-ConsumeBidirectionalStream caught unexpected exception 'generator' object has no attribute 'add_done_callback' and will exit." #670

Open mukund-ananthu opened 2 weeks ago

mukund-ananthu commented 2 weeks ago

Stacktrace:

"Thread-ConsumeBidirectionalStream caught unexpected exception 'generator'
object has no attribute 'add_done_callback' and will exit."

"Traceback (most recent call last):

File "/usr/local/lib/python3.8/site-packages/google/api_core/bidi.py", line
644, in _thread_main

self._bidi_rpc.open()

File "/usr/local/lib/python3.8/site-packages/google/api_core/bidi.py", line
294, in open

call._wrapped.add_done_callback(self._on_call_done)

AttributeError: 'generator' object has no attribute 'add_done_callback'"

Calling code: https://github.com/googleapis/python-pubsub/blob/509460520d6514361cc18675040b8b86a79d0271/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py#L846-L854

Potentially similar issues: https://github.com/googleapis/python-api-core/issues/309

Could you please let us know which scenarios could lead to the error and if this represents a bug ?

vchudnov-g commented 1 week ago

Update: we're investigating and tracking internally (b/346537059) since this was triggered by an external report. When we have a status update relevant to this repo, we'll post it here.