python-sdks icon indicating copy to clipboard operation
python-sdks copied to clipboard

ImportError: cannot import name 'codecs'

Open parshvadaftari opened this issue 1 year ago • 0 comments

When I run the minimal_assistant.py, this was the error that showed up. ImportError: cannot import name 'codecs' from 'livekit.agents' (/Users/parshva/SoftmaxAI/Projects/.conda/lib/python3.10/site-packages/livekit/agents/init.py)

It's a package issue, where instead of -> from livekit.agents import codecs, tts, utils

it should be: -> from livekit.agents.utils import codecs -> from livekit.agents import tts, utils

Doing this changes in my local stt.py and tts.py helped me to run the file. I suggest to update the pypi package as the 'codecs' is in "livkit.agents.utils" and not in "livekit.agents"

parshvadaftari avatar Jun 19 '24 04:06 parshvadaftari