New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error upon socket connection closure #183
Comments
Hi @roerohan The Live client is in the process of getting a major overhaul. Will ping the community to take a look when the PR becomes available. |
Alright! I also wanted to bring to your notice that there's no way to handle this error currently since the async task created in the following code snippet isn't returned outside the SDK, and there's no way to catch the exception since I don't have access to this task deepgram-python-sdk/deepgram/transcription.py Line 175 in 2135dc5
For now, the only way I found to fix it was a hacky workaround, by using the |
A new release was just posted which should address this problem, please take a look: |
Latest is |
@roerohan |
Hi @dvonthenen |
cool. If you run into any problems, please let me know. |
Re-opened to take a look at when I have time. I am unfamiliar with v2 version, so this might take some time. |
@SandraRodgers said she would take a look at this issue and the other one since she has more knowledge about the |
i have an issue not sure if it is a similar one: Could not open socket: type object 'LiveTranscriptionEvents' has no attribute 'Unhandled' |
Description
I'm using v2.11.0 of your SDK and I often run into this error in live transcriptions.
After this, none of the
send()
method calls on an instance of theLiveTranscription
object send any data over the socket.Debugging
It seems like the issue is here:
deepgram-python-sdk/deepgram/transcription.py
Line 198 in 2135dc5
It appears that the code only checks if the socket is closed when there is a message timeout while waiting in the queue.
However, if I insert a lot of messages in the queue (by calling the
send
method) whenself._socket.closed
isFalse
, and the socket closes later, the code will try to send the message over a closed socket at some point, resulting in the above error.Since there is no
try except
block, the error also causes thewhile
loop to exit, and therefore I'm not able to send any more messages using that object.The text was updated successfully, but these errors were encountered: