diff --git a/livekit-agents/livekit/agents/ipc/proc_main.py b/livekit-agents/livekit/agents/ipc/proc_main.py index df694bd0d..6d8ead956 100644 --- a/livekit-agents/livekit/agents/ipc/proc_main.py +++ b/livekit-agents/livekit/agents/ipc/proc_main.py @@ -57,6 +57,8 @@ def emit(self, record: logging.LogRecord) -> None: record.exc_text = None record.stack_info = None + # https://websockets.readthedocs.io/en/stable/topics/logging.html#logging-to-json + # webosckets library add "websocket" attribute to log records, which is not pickleable if hasattr(record, "websocket"): record.websocket = None