home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.64k stars 30.78k forks source link

HA 115.4 : KeyError: 'TPE1' #40731

Closed Mariusthvdb closed 4 years ago

Mariusthvdb commented 4 years ago

The problem

Updating from 115.3 to 115.4 throws never seen errors when using tts speech notifications. No speech is playing at all.

Downgrading to 115.3 immediately brings back all tts notifications

Environment

Problem-relevant configuration.yaml

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mutagen/easyid3.py", line 124, in setter
    frame = id3[frameid]
  File "/usr/local/lib/python3.8/site-packages/mutagen/_util.py", line 537, in __getitem__
    return self.__dict[key]
KeyError: 'TPE1'

and

Unexpected error for call_service at pos 8: Invalid MultiSpec data: TextFrame(encoding=<Encoding.UTF8: 3>, text=['nl'])

Additional information

see https://community.home-assistant.io/t/0-115-b-day-release-media-browser-tags-automations-wth/227518/635?u=mariusthvdb where fellow members report related issues

mondomx commented 4 years ago

Same error, however mine is linked with the value on the voice tag on the amazon_polly tts:

tts:
  - platform: amazon_polly
    aws_access_key_id: (REDACTED)
    aws_secret_access_key: (REDACTED)
    voice: Miguel
    sample_rate: 24000 
    engine: standard

Upon call of service: tts.amazon_polly_say it errors out. I've tried multiple voices and the result is the same.

This is the homeassistant.log output:

2020-09-28 17:27:08 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140658621668560] Invalid MultiSpec data: TextFrame(encoding=<Encoding.UTF8: 3>, text=['Miguel'])
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mutagen/easyid3.py", line 124, in setter
    frame = id3[frameid]
  File "/usr/local/lib/python3.8/site-packages/mutagen/_util.py", line 537, in __getitem__
    return self.__dict[key]
KeyError: 'TPE1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1350, 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 471, in write_tags
    tts_file["artist"] = ID3Text(encoding=3, text=artist)
  File "/usr/local/lib/python3.8/site-packages/mutagen/_file.py", line 74, in __setitem__
    self.tags[key] = value
  File "/usr/local/lib/python3.8/site-packages/mutagen/easyid3.py", line 222, in __setitem__
    return func(self.__id3, key, value)
  File "/usr/local/lib/python3.8/site-packages/mutagen/easyid3.py", line 126, in setter
    id3.add(mutagen.id3.Frames[frameid](encoding=3, text=value))
  File "/usr/local/lib/python3.8/site-packages/mutagen/id3/_frames.py", line 65, in __init__
    setattr(self, checker.name,
  File "/usr/local/lib/python3.8/site-packages/mutagen/id3/_frames.py", line 76, in __setattr__
    self._setattr(name, checker.validate(self, value))
  File "/usr/local/lib/python3.8/site-packages/mutagen/id3/_specs.py", line 533, in validate
    raise ValueError('Invalid MultiSpec data: %r' % value)
ValueError: Invalid MultiSpec data: TextFrame(encoding=<Encoding.UTF8: 3>, text=['Miguel'])
frenck commented 4 years ago

Duplicate of #40719

aidbish commented 4 years ago

Seems a duplicate of https://github.com/home-assistant/core/issues/40698

Mariusthvdb commented 4 years ago

Seems a duplicate of #40698

no, its not, because that only mentions 116 dev, and this happens on HA OS 115.4. still, if this is enough for the dev team to go on?

aidbish commented 4 years ago

Seems a duplicate of #40698

no, its not, because that only mentions 116 dev, and this happens on HA OS 115.4. still, if this is enough for the dev team to go on?

@Mariusthvdb, look at the errors they are identical, just because e is using 0.116 dev doesnt meant it isnt the same issue

Mariusthvdb commented 4 years ago

there are several threads now on this. lets keep this one closed.... Frenck knows what to do ;-)

Mariusthvdb commented 4 years ago

stil: is this issue solved by https://github.com/home-assistant/core/releases/tag/0.115.5 too? I ask because the issue referenced in calling this a duplicate, is still open....

Mariusthvdb commented 4 years ago

fixed! in ha 115.5 thanks Frenck!