Logger: homeassistant.components.websocket_api.http.connection.140156870539296
Source: components/tts/__init__.py:469
Integration: Home Assistant WebSocket API ([color=var(--primary-color)]documentation, [color=var(--primary-color)]issues)
First occurred: 下午11:22:18 (1 occurrences)
Last logged: 下午11:22:18
cannot import name 'bchr' from 'mutagen._util' (/usr/local/lib/python3.8/site-packages/mutagen/_util.py)
详细报错信息如下:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 138, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1370, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 168, in async_say_handle
url = await tts.async_get_url(
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 341, in async_get_url
filename = await self.async_get_tts_audio(
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 368, in async_get_tts_audio
data = self.write_tags(filename, data, provider, message, language, options)
File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 469, in write_tags
tts_file = mutagen.File(data_bytes)
File "/usr/local/lib/python3.8/site-packages/mutagen/_util.py", line 148, in wrapper_func
def wrap(func):
File "/usr/local/lib/python3.8/site-packages/mutagen/_file.py", line 239, in File
if easy:
File "/usr/local/lib/python3.8/site-packages/mutagen/flac.py", line 30, in <module>
from mutagen._util import resize_bytes, MutagenError, get_size, loadfile, \
ImportError: cannot import name 'bchr' from 'mutagen._util' (/usr/local/lib/python3.8/site-packages/mutagen/_util.py)
调用服务 tts/baidu_say 失败。 cannot import name 'bchr' from 'mutagen._util' (/usr/local/lib/python3.8/site-packages/mutagen/_util.py)