Skip to content
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

[Bug]: AttributeError in cartesia_synthesizer.py tear_down #716

Open
spalman opened this issue Oct 9, 2024 · 0 comments
Open

[Bug]: AttributeError in cartesia_synthesizer.py tear_down #716

spalman opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@spalman
Copy link

spalman commented Oct 9, 2024

Brief Description

I'm conducting calls using Cartesia.AI TTS and Sentry reported AttributeError 'NoneType' object has no attribute 'close' in 118/600 cases. I couldn't reproduce it, but checking that websocket is not None might help.

Stack trace:

  • vocode/streaming/synthesizer/cartesia_synthesizer.py in tear_down at line 209
      204
      await super().tear_down()
      205
      if self.no_more_inputs_task:
      206
      self.no_more_inputs_task.cancel()
      207
      if self.ctx:
      208
      self.ctx._close()
      209
      await self.ws.close()
      210
      await self.client.close()
      __class__ | -- | -- self |
  • vocode/streaming/streaming_conversation.py in terminate at line 1014
      1009
      if self.events_manager and self.events_task:
      1010
      logger.debug("Terminating events Task")
      1011
      self.events_task.cancel()
      1012
      await self.events_manager.flush()
      1013
      logger.debug("Tearing down synthesizer")
      1014
      await self.synthesizer.tear_down()
      1015
      logger.debug("Terminating agent")
      1016
      await self.agent.terminate()
      1017
      logger.debug("Terminating output device")
      1018
      await self.output_device.terminate()
      1019
      logger.debug("Terminating speech transcriber")

LLM

GPT-4

Transcription Services

Deepgram

Synthesis Services

None

Telephony Services

Twilio

Conversation Type and Platform

No response

Steps to Reproduce

Couldn't reproduce

Expected Behavior

No unhandled exceptions

Screenshots

No response

@spalman spalman added the bug Something isn't working label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant