Skip to content

fix livekit-api types #407

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

Merged
merged 2 commits into from
Apr 3, 2025
Merged

fix livekit-api types #407

merged 2 commits into from
Apr 3, 2025

Conversation

theomonnom
Copy link
Member

Fix:

Traceback (most recent call last):
  File "/Users/theomonnom/livekit/agents/examples/voice_agents/structured_output.py", line 10, in <module>
    from livekit.agents import (
  File "/Users/theomonnom/livekit/agents/livekit-agents/livekit/agents/__init__.py", line 15, in <module>
    from . import cli, ipc, llm, metrics, stt, tokenize, tts, utils, vad  # noqa: F401
  File "/Users/theomonnom/livekit/agents/livekit-agents/livekit/agents/cli/__init__.py", line 1, in <module>
    from .cli import run_app
  File "/Users/theomonnom/livekit/agents/livekit-agents/livekit/agents/cli/cli.py", line 15, in <module>
    from ..worker import JobExecutorType, Worker, WorkerOptions
  File "/Users/theomonnom/livekit/agents/livekit-agents/livekit/agents/worker.py", line 39, in <module>
    from livekit import api, rtc
  File "/Users/theomonnom/livekit/python-sdks/livekit-api/livekit/api/__init__.py", line 38, in <module>
    from .livekit_api import LiveKitAPI
  File "/Users/theomonnom/livekit/python-sdks/livekit-api/livekit/api/livekit_api.py", line 6, in <module>
    from .sip_service import SipService
  File "/Users/theomonnom/livekit/python-sdks/livekit-api/livekit/api/sip_service.py", line 40, in <module>
    class SipService(Service):
  File "/Users/theomonnom/livekit/python-sdks/livekit-api/livekit/api/sip_service.py", line 188, in SipService
    transport: Optional[SIPTransport] = None,
  File "/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 277, in inner
    return func(*args, **kwds)
  File "/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 354, in __getitem__
    return self._getitem(self, parameters)
  File "/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 478, in Optional
    arg = _type_check(parameters, f"{self} requires a single type.")
  File "/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 166, in _type_check
    raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: typing.Optional requires a single type. Got <google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x109e27070>.

@theomonnom theomonnom requested a review from davidzhao April 3, 2025 18:15
Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@theomonnom theomonnom merged commit bee5b2f into main Apr 3, 2025
10 checks passed
@theomonnom theomonnom deleted the theo/fix-types-errors branch April 3, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants