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.39k stars 51 forks source link

sqlite3.ProgrammingError: Error binding parameter 4: type 'Album' is not supported #2653

Closed OzGav closed 3 months ago

OzGav commented 4 months ago

What version of Music Assistant has the issue?

2.0.0b0

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

2024.7.1.b0

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

The problem

I am seeing the error shown in the title of this report. Not sure what is causing it yet

How to reproduce

I am unable to determine what triggers these at the moment. I noticed in the 2.1.0 betas as well.

Music Providers

Airplay, Slimproto, DLNA, Chromecast, Fully Kiosk, HA and Snapcast providers are added

Player Providers

Radio browser, local, Spotify and TuneIn providers are added

Full log output

ma.log

Additional information

Relevant excerpt

2024-07-17 23:27:21.711 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/metadata.py", line 256, in metadata_scanner
    await self._update_album_metadata(album)
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/metadata.py", line 520, in _update_album_metadata
    await self.mass.music.albums.update_item_in_library(album.item_id, album)
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/base.py", line 138, in update_item_in_library
    await self._update_library_item(item_id, update, overwrite=overwrite)
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/albums.py", line 236, in _update_library_item
    await self.mass.music.database.update(
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/helpers/database.py", line 199, in update
    await self.execute(sql_query, {**match, **values})
  File "/usr/local/lib/python3.12/site-packages/music_assistant/server/helpers/database.py", line 225, in execute
    return await self._db.execute(query, values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiosqlite/core.py", line 193, in execute
    cursor = await self._execute(self._conn.execute, sql, parameters)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiosqlite/core.py", line 132, in _execute
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiosqlite/core.py", line 115, in run
    result = function()
             ^^^^^^^^^^
sqlite3.ProgrammingError: Error binding parameter 4: type 'Album' is not supported 

What version of Home Assistant Core are your running

2024.7

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Intel NUC

OzGav commented 3 months ago

No longer seeing this in 2.2.0b5

OzGav commented 3 months ago

Sorry I didn't wait long enough. Reopened

marcelveldt commented 3 months ago

This is fixed in 2.2.0 beta 8 - if the fix is confirmed working, it will also be included in the patch release 2.1.5 for the stable version