Error creating a new playlist via the API

Need help? Post your questions here.

Moderator: moderators

Error creating a new playlist via the API

Postby zeaklous » Wed Dec 14, 2022 3:18 am

Hey there. Thanks for making Subsonic!

When I try to create a playlist via the Python API, I am getting the following error:

Code: Select all
Traceback (most recent call last):
  File "", line 118, in <module>
    if create_playlist(conn, PLAYLIST_NAME, playlistSongs):
  File "", line 74, in create_playlist
  File "/home/zs/.local/lib/python3.8/site-packages/libsonic/", line 758, in createPlaylist
    res = self._doInfoReq(req)
  File "/home/zs/.local/lib/python3.8/site-packages/libsonic/", line 2782, in _doInfoReq
    dres = json.loads('utf-8'))
  File "/usr/lib/python3.8/json/", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)

I'm guessing the response isn't in JSON format but the spec says it should be. Any idea how to remedy this?
Posts: 5
Joined: Thu Dec 08, 2022 7:39 pm

Re: Error creating a new playlist via the API

Postby acroyear » Thu Dec 22, 2022 2:31 am

The Python API is not officially supported. Not sure what's up, but there is a flag on the URL to ensure that the data is JSON back and forth, and I couldn't say what's up with this specifically.
Joe Shelby
User avatar
Posts: 774
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Return to Help

Who is online

Users browsing this forum: No registered users and 12 guests