#python sdk 3.1.8

1 messages · Page 1 of 1 (latest)

sonic crypt
#

I sometimes receive exceptions like so {'type': 'Exception', 'description': 'Exception in _listening', 'message': "'NoneType' object has no attribute 'recv'", 'variant': ''} after closing a live client connection. I think there may be some missing if self._socket checks in the listening thread handler?

quick swallowBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
wise axle
#

hi @sonic crypt

will take a look... do you have the entire stack trace?

sonic crypt
#

That exception is all that I have unfortunately. My guess is that self._socket is set to None somewhere and the listening thread is still trying to receive

#

In general though, is there a way to silence or disable logging? We've found the logs are a bit noisy and the sdk's logs end up in our sentry alerting

wise axle
#

yea, do you have a stack trace?

#

that would be really helpful.. I am looking at this right now as well

wise axle
#

There is a PR that I just posted that gets rid of something that I came to the conclusion was problematic and opted to do the same thing as the threaded client and just use recv
https://github.com/deepgram/deepgram-python-sdk/pull/338

GitHub

Proposed changes

The LiveClient has been far more stable than the AsyncLiveClient. This makes both clients similar in flow by shifting the AsyncLiveClient to behave similarly to the LiveClient.
Ch...

#

If you want to give that a try, the feedback would be wonderful

sonic crypt
#

Thanks, this looks good to me. I can give it a go

wise axle