hass-music-assistant icon indicating copy to clipboard operation
hass-music-assistant copied to clipboard

Plex Playlists not loading Content - error [argument of type 'nonetype' is not iterable]

Open aLTeReGo-SWI opened this issue 6 months ago • 9 comments

What version of Music Assistant has the issue?

2.1.0

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?

  • [X] Yes

The problem

Most (not all) Plex playlists never produce any results and return the error 'argument of type 'NoneType' is not iterable'. Full debug Error text below.

2024-08-01 09:41:00.355 ERROR (MainThread) [music_assistant.webserver] Error handling message: CommandMessage(message_id=25, command='music/playlists/playlist_tracks', args={'item_id': '12', 'provider_instance_id_or_domain': 'library', 'force_refresh': False}) Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/webserver.py", line 352, in _run_handler result = [x async for x in result] ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/playlists.py", line 65, in tracks tracks = await self._get_provider_playlist_tracks( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/playlists.py", line 353, in _get_provider_playlist_tracks for item in await provider.get_playlist_tracks(item_id, page=page): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 895, in get_playlist_tracks if track := await self._parse_track(plex_track): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 729, in _parse_track track.album = self._get_item_mapping( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 428, in _get_item_mapping name, version = parse_title_and_version(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/common/helpers/util.py", line 85, in parse_title_and_version if splitter in title: ^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

How to reproduce

  1. Click 'Music Assistant' from Home Assistant's left navigation pane
  2. Click 'Playlists' from the bottom Music Assistant panel
  3. Select a Playlist

Music Providers

Plex

Player Providers

UPnP/DLNA Player provider

Full log output

music-assistant.log

Additional information

No response

What version of Home Assistant Core are your running

2024.7.4

What type of installation are you running?

Home Assistant Supervised

On what type of hardware are you running?

Linux

aLTeReGo-SWI avatar Aug 01 '24 16:08 aLTeReGo-SWI