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.32k stars 49 forks source link

'NoneType' object has no attribute 'unique_file_ids' error in logs; causes files to be excluded from library #2656

Closed dmcc closed 2 months ago

dmcc commented 2 months ago

What version of Music Assistant has the issue?

2.1.0

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

2024.5.1

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

The problem

MP3 files that fail to load with eyed3 cause this log error:

... [music_assistant.providers.filesystem_local] Error processing [filename].mp3 - 'NoneType' object has no attribute 'unique_file_ids'

I believe this comes from this line. As a result of this exception, thes file are not added to the library and not playable.

I've seen Troubleshooting and agree that files should be tagged properly...at the same time, I have a large number of files that meet these conditions and would like to be able to play them before I can repair their tags. In the previous version of Music Assistant, these files were playable so a workaround would be great.

How to reproduce

This is kind of tricky -- I'm not sure what about the files makes their tag unloadable by eyed3, but I do know that they hit this exception with the warning "Lame tag CRC check failed".

Music Providers

N/A

Player Providers

N/A

Full log output

No response

Additional information

No response

What version of Home Assistant Core are your running

2024.6.2

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Linux

MelHarbour commented 2 months ago

Yeah, it's one of those where it would be good if eyed3 didn't have a problem reading, but there could be any number of reasons why the library might return NoneType, so it's probably better with a guard clause in regardless.