V1.1.8: error deleting playlists
See original GitHub issueI had several file system playlists without content, so decided to delete them. Two issues found: 1: when I delete a playlist, it remains in the list till I close the playlist overview. 2: I had one playlist that I can’t remove and caused two errors:
[546718140736] Error handling message: Unknown error (unknown_error)
21:12:55 – (ERROR) Home Assistant WebSocket API (custom integration)
Job [Add file://playlist/albumsnightwishnightwishm3u to database] failed with error 'utf-8' codec can't decode byte 0xe4 in position 3021: invalid continuation byte.
21:12:55 – (ERROR) /usr/local/lib/python3.9/site-packages/music_assistant/mass.py
Details:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/mass/websockets.py:736
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 21:12:55 (1 occurrences)
Last logged: 21:12:55
[546718140736] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/config/custom_components/mass/websockets.py", line 96, in async_get_mass_func
await orig_func(hass, connection, msg, mass)
File "/config/custom_components/mass/websockets.py", line 736, in websocket_library_remove
await mass.music.remove_from_library(item.media_type, item.item_id, item.provider)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/__init__.py", line 220, in remove_from_library
await ctrl.remove_from_library(
File "/usr/local/lib/python3.9/site-packages/music_assistant/models/media_controller.py", line 153, in remove_from_library
db_item = await self.get(
File "/usr/local/lib/python3.9/site-packages/music_assistant/models/media_controller.py", line 96, in get
return await self.add(details)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/playlists.py", line 52, in add
await self.mass.metadata.get_playlist_metadata(item)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/metadata/__init__.py", line 102, in get_playlist_metadata
for track in await self.mass.music.playlists.tracks(
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/playlists.py", line 47, in tracks
return await provider.get_playlist_tracks(item_id)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/providers/filesystem.py", line 285, in get_playlist_tracks
for line in await _file.readlines():
File "/usr/local/lib/python3.9/site-packages/aiofiles/threadpool/utils.py", line 45, in method
return (yield from self._loop.run_in_executor(self._executor, cb))
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 3021: invalid continuation byte
Logger: music_assistant.mass
Source: /usr/local/lib/python3.9/site-packages/music_assistant/mass.py:243
First occurred: 21:12:55 (1 occurrences)
Last logged: 21:12:55
Job [Add file://playlist/albumsnightwishnightwishm3u to database] failed with error 'utf-8' codec can't decode byte 0xe4 in position 3021: invalid continuation byte.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/playlists.py", line 52, in add
await self.mass.metadata.get_playlist_metadata(item)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/metadata/__init__.py", line 102, in get_playlist_metadata
for track in await self.mass.music.playlists.tracks(
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/playlists.py", line 47, in tracks
return await provider.get_playlist_tracks(item_id)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/music/providers/filesystem.py", line 285, in get_playlist_tracks
for line in await _file.readlines():
File "/usr/local/lib/python3.9/site-packages/aiofiles/threadpool/utils.py", line 45, in method
return (yield from self._loop.run_in_executor(self._executor, cb))
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 3021: invalid continuation byte
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
I cannot delete a playlist, error message always occur which ...
To do this, tap Library / Playlists, tap the playlist concerned, then tap the pencil icon, and change the privacy to Private, then...
Read more >Cannot Delete Playlists - Samsung Community - 1692664
I'm using Samsung Music. When I delete a Playlist and restart my tablet, the playlists is back. Why, and how do I delete...
Read more >I can't delete my playlist : r/YoutubeMusic - Reddit
Try deleting them through regular YouTube.com, it might help.
Read more >LUNA Release Notes - Universal Audio Support Home
Shift + Command + delete deletes selected tracks ... LUNA sessions opened in v1.1.8 cannot be opened in earlier LUNA versions due to...
Read more >API bug: Cannot remove specific song from a playlist ... - GitHub
Deleting in the official spotify app works, however not with the API. I was able to have 3 cases of this, one of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yes, I need to notify the listing that the content needs to be refreshed. I’m going to introduce a generic approach for that with an event from the backend, same logic that is now used when the metadata of an object was lazy loaded in the background and you automagically see the new details.
Yes, at this time I’m too lazy to write migration logic so I just reset the db each I time I make a possibly breaking change in the model. I think we’re almost at the point where we reach the first stable version after which I will also follow a more structured release pattern and try to avoid db rescans whenever possible 😉
For me the last things before I consider things as “MVP” or “first stable version” is when the magic logic and metadata issues are all fixed because that is the foundation of everything. I think we’re almost there. Only this change is left:
https://github.com/music-assistant/hass-music-assistant/issues/184#issuecomment-1132604363
Looks good: