music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.2k stars 43 forks source link

Assertion when extracting MP3 tag #2202

Open g4sbq opened 1 month ago

g4sbq commented 1 month ago

What version of Music Assistant has the issue?

2.0.0b145

What version of the Home Assistant Integration have you got installed?

2024.5.2

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

MA fails to extract the tag from a track which is apparently correctly tagged by MusicBrainz Picard. An assertion is generated.

How to reproduce

Scan the track

Music Providers

Filesystem (Remote share)

Player Providers

N/A

Full log output

2024-05-07 11:16:23.513 INFO (MainThread) [music_assistant] Starting Music Assistant Server (9e42f8ce004049fd8d9637a51c89b98e) version 2.0.0b145 - HA add-on: True - Safe mode: False 2024-05-07 11:16:23.524 INFO (MainThread) [music_assistant.cache] Initializing cache controller... 2024-05-07 11:16:23.600 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes. 2024-05-07 11:16:23.912 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.0.1 with libsoxr support 2024-05-07 11:16:23.912 INFO (MainThread) [music_assistant.streams] Starting server on 0.0.0.0:8097 - base url: http://192.168.14.115:8097 2024-05-07 11:16:23.918 INFO (MainThread) [music_assistant.webserver] Starting server on 172.30.32.1:8095 - base url: http://172.30.32.1:8095 2024-05-07 11:16:24.761 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider 2024-05-07 11:16:24.762 INFO (MainThread) [music_assistant] Loaded player provider Universal Group Player 2024-05-07 11:16:24.762 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant 2024-05-07 11:16:24.766 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider 2024-05-07 11:16:24.768 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider 2024-05-07 11:16:24.774 INFO (MainThread) [music_assistant] Loaded player provider Chromecast 2024-05-07 11:16:24.775 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider 2024-05-07 11:16:24.784 INFO (MainThread) [music_assistant] Loaded player provider SONOS 2024-05-07 11:16:24.909 INFO (MainThread) [music_assistant.providers.filesystem_smb] Mounting //192.168.14.234/music/'Top 40 Singles/2009/Top 40 Singles 2009-07-05 (New Entries)' to /tmp/filesystem_smb--N9YA2muk 2024-05-07 11:16:24.910 INFO (MainThread) [music_assistant.players] Player registered: 6063a422-1c94-d703-7a95-1d8f5dd00dbd/Living Room Speaker 2024-05-07 11:16:24.950 INFO (MainThread) [music_assistant.music] Sync task for Music Assistant completed 2024-05-07 11:16:25.170 INFO (MainThread) [music_assistant.players] Player registered: e9c34597-ad9e-65e3-c59b-ecaa6e56db6f/Bathroom speaker 2024-05-07 11:16:25.244 INFO (MainThread) [music_assistant.players] Player registered: f15c1d26-89c5-a9dd-636b-0e830c0c7f63/Kitchen Speaker 2024-05-07 11:16:25.270 INFO (MainThread) [music_assistant] Loaded player provider Airplay 2024-05-07 11:16:25.276 INFO (MainThread) [music_assistant.players] Player registered: apb827eb0d3ed5/frontroom-osmc 2024-05-07 11:16:25.488 INFO (MainThread) [music_assistant] Loaded music provider Filesystem (remote share) 2024-05-07 11:16:26.977 ERROR (MainThread) [music_assistant.providers.filesystem_smb] Error processing Michael Jackson - Dirty Diana.mp3 - 2024-05-07 11:16:28.033 INFO (MainThread) [music_assistant.music] Sync task for Filesystem (remote share) completed

Additional information

I appreciate that there must be an issue with the MP3 file however, having re-tagged multiple times, I cannot see a way forward. If MA could trap the assertion, possibly with additional information, I could see what was happening.

The track plays normally.

HA runs in a VM

Re-tagged using MusicBrainz Picard.

Using debug logging... 2024-05-07 10:49:58.459 DEBUG (MainThread) [music_assistant.music.track] updated Don't Stop 'Till You Get Enough in database: (id 5) 2024-05-07 10:49:58.463 DEBUG (MainThread) [music_assistant.providers.filesystem_smb] Processing: Michael Jackson - Dirty Diana.mp3 2024-05-07 10:49:58.467 DEBUG (MainThread) [music_assistant.helpers.process.ffprobe] Process ffprobe started with PID 696 2024-05-07 10:49:58.763 DEBUG (MainThread) [music_assistant.helpers.process.ffprobe] Process ffprobe with PID 696 stopped with returncode 0 2024-05-07 10:49:58.763 ERROR (MainThread) [music_assistant.providers.filesystem_smb] Error processing Michael Jackson - Dirty Diana.mp3 - Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/filesystem_local/base.py", line 358, in sync_library track = await self._parse_track(item) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/filesystem_local/base.py", line 807, in _parse_track artist = await self._parse_artist(track_artist_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/filesystem_local/base.py", line 874, in _parse_artist assert name or artist_path ^^^^^^^^^^^^^^^^^^^ AssertionError 2024-05-07 10:49:58.766 DEBUG (MainThread) [music_assistant.providers.filesystem_smb] Processing: Michael Jackson - You Are Not Alone.mp3

What version of Home Assistant Core are your running

2024.5.2

What type of installation are you running?

Home Assistant Supervised

On what type of hardware are you running?

Alternative

OzGav commented 1 month ago

Do you have any other metadata info in that folder?

Also post the tags assigned to that track (picture from Picard is fine)

g4sbq commented 1 month ago

There are 13 additional tracks in that folder, 8 of which get added to the MA database correctly. For some reason, only one Michael Jackson (out of 7 available) is imported.

image

OzGav commented 1 month ago

OK thanks. This will get looked at in due course.

marcelveldt commented 1 month ago

Strange, its doing something that really shouldn't happen (hence the assertion) - I will need to have a closer look to this in the next couple of days. I may get back on the line to ask for more details