#Client tool thread safe

1 messages · Page 1 of 1 (latest)

left wing
#

Can you explain a bit mor ewhat the issue is?

soft tangle
# left wing Can you explain a bit mor ewhat the issue is?

Certainly.
I tried to run a web scraper through client tool, and it led to WebSocket disconnection, error 1008 policy violation. I troubleshooted quite a bit and it seems the root issue is operations like web scraping (or perhaps other operations that takes long time to run) , when running in the same event loop as the web socket, it caused connection to time out. web socket expects specific message format, and is quite picky in terms of disruption/timeout, etc.

left wing
#

Yeah but you can just run it on a different event loop in executor

#

So your main websocket is still answering and responding to our pings

soft tangle
soft tangle
#

I see. you mean something like this? i will give it a try. thanks!
loop = asyncio.get_event_loop()
loop.run_in_executor ...

left wing
#

yes exactly

soft tangle
#

Can you please check conversation lcj5DW9trl84GdA3eoBv? I keep receiving: Error sending user audio chunk: received 1008 (policy violation).
Already ran the scraper on a different loop.

soft tangle
#

Can you please check the error for the above conversation? Thanks!

soft tangle
#

figured out. i returned client tool in the format that 11labs websocket doesn't expect.

left wing
#

thank you!