steep-balloon-41261
07/09/2025, 8:41 PMtall-airline-16756
07/09/2025, 8:41 PMtall-airline-16756
07/09/2025, 8:42 PMAttributeError: 'JobContext' object has no attribute 'participants'
occurs because the JobContext
class does not have a participants
attribute. Instead, the list of participants is accessible from the Room
object associated with the job context.
To fix the issue, access the Room
object via the room
attribute of JobContext
, and then use its participant-related methods. For example:
room = job_context.room
participants = room.GetParticipants()
You should update your code to reference job_context.room.GetParticipants()
or the appropriate method on the Room
object, instead of trying to call job_context.participants()
.
If you need more detailed guidance based on your project or code structure, please provide a snippet showing how you're initializing and using JobContext
and accessing participants.
Sources: JobContext | LiveKit Agents | agents/src/job.ts | livekit-agents/livekit/agents/__init__.py | livekit-protocol/livekit/protocol/room.pyi | pkg/rtc/room.goshy-article-62777
07/09/2025, 8:58 PMshy-article-62777
07/09/2025, 8:58 PMtall-airline-16756
07/09/2025, 8:58 PM