Spotify playlists do not show up in MPD

You are right! I got the problem wrong, the strange thing actually happens a few steps later:

from mpd import MPDClient
MPD_client = MPDClient()
MPD_client.connect("localhost", 6600)
playlist = MPD_client.listplaylists()[0]
print(playlist)
MPD_client.load(playlist["playlist"])

The “listplaylists” command gives me a correct list of the playlists from Spotify. The print(playlist) output is:

{‘playlist’: ‘test’, ‘last-modified’: ‘2024-01-16T20:29:59Z’}.

However, the code fails if I try to load one of these playlists:

MPD_client.load(playlist[“playlist”])
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 478, in mpd_command
return wrapper(self, name, args, callback)
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 541, in _execute
return retval()
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 463, in command_callback
res = function(self, self._read_lines())
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 396, in _parse_nothing
for line in lines:
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 595, in _read_lines
line = self._read_line()
File “/home/pi/.local/lib/python3.9/site-packages/mpd/base.py”, line 584, in _read_line
raise CommandError(error)
mpd.base.CommandError: [50@0] {load} No such playlist