Skip to content

Extension crashes in get_user_playlists with 404 error #14

@Dhar

Description

@Dhar

During startup, the extension crashes with the following error:

2015-07-29 09:15:01,718 INFO [18096:MainThread] mopidy_subsonic.client: Connecting to Subsonic library http://xxx.xxx.com:4040 as user xxx
2015-07-29 09:15:01,937 ERROR [18096:MainThread] mopidy.commands: Uncaught exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 274, in run
    backends = self.start_backends(config, backend_classes, audio)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 352, in start_backends
    config=config, audio=audio).proxy()
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
    obj = cls(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/actor.py", line 32, in __init__
    self.playlists = SubsonicPlaylistsProvider(backend=self)
  File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 15, in __init__
    self.playlists = self._get_playlists()
  File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 36, in _get_playlists
    playlists = self.remote.get_user_playlists()
  File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/client.py", line 365, in get_user_playlists
    results = self.api.getPlaylists().get('playlists')
  File "/usr/local/lib/python2.7/dist-packages/libsonic/connection.py", line 593, in getPlaylists
    res = self._doInfoReq(req)
  File "/usr/local/lib/python2.7/dist-packages/libsonic/connection.py", line 2394, in _doInfoReq
    res = self._opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

I examined the URL being accessed and discovered that it does exist. Running curl against it shows a valid response:

user@machine:~$ curl http://xxx.xxx.com:4040/subsonic/rest/getPlaylists.view
<?xml version="1.0" encoding="UTF-8"?>
<subsonic-response xmlns="http://subsonic.org/restapi" status="failed" version="1.12.0">
   <error code="10" message="Required parameter is missing."/>
</subsonic-response>

The extension doesn't seem to be using the username or password which are some of the "required parameters" that are missing according to the Subsonic API docs. These missing parameters, along with the missing protocol version and client ID, seem to indicate that this extension couldn't work with Subsonic even if a spurious 404 wasn't being generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions