mopidy-spotify: Unhandled exception when playlist loading times out (MPD list command)

Hello, I just reinstalled Arch today and it must be on my end because I just installed mopidy-spotify on my old installation about 5 days ago and it was working. As of now, everything looks fine and then it throws a bunch of errors. This is my output:

INFO     Starting Mopidy 2.0.1
INFO     Loading config from builtin defaults
INFO     Loading config from /home/fox/.config/mopidy/mopidy.conf
INFO     Loading config from command line options
INFO     Enabled extensions: spotify, mpd, http, stream, m3u, softwaremixer, file, local
INFO     Disabled extensions: none
INFO     Starting Mopidy mixer: SoftwareMixer
INFO     Starting Mopidy audio
INFO     Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend, SpotifyBackend
INFO     No local library metadata cache found at /home/fox/.local/share/mopidy/local/library.json.gz. Please run `mopidy local scan` to index your local music library. If you do not have a local music collection, you can disable the local backend to hide this message.
INFO     Loaded 0 local tracks using json
INFO     Audio output set to "autoaudiosink"
INFO     Starting Mopidy core
INFO     Logged in to Spotify in offline mode
INFO     Logged in to Spotify in online mode
INFO     Starting Mopidy frontends: MpdFrontend, HttpFrontend
INFO     MPD server running at [::]:6600
INFO     HTTP server running at [::ffff:127.0.0.1]:6680
INFO     Starting GLib mainloop
INFO     New MPD connection from [::1]:39242
INFO     New MPD connection from [::1]:39244
ERROR    SpotifyBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 142, in get_distinct
    values = future.get()
  File "/usr/lib/python2.7/site-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/lib/python2.7/site-packages/mopidy_spotify/library.py", line 32, in get_distinct
    field, query)
  File "/usr/lib/python2.7/site-packages/mopidy_spotify/distinct.py", line 20, in get_distinct
    config, session, requests_session, query)
  File "/usr/lib/python2.7/site-packages/mopidy_spotify/distinct.py", line 45, in _get_distinct_artists
    for track in _get_playlist_tracks(config, session)
  File "/usr/lib/python2.7/site-packages/mopidy_spotify/distinct.py", line 44, in <setcomp>
    artist.name
  File "/usr/lib/python2.7/site-packages/mopidy_spotify/distinct.py", line 119, in _get_playlist_tracks
    playlist.load()
  File "/usr/lib/python2.7/site-packages/spotify/playlist.py", line 118, in load
    return utils.load(self._session, self, timeout=timeout)
  File "/usr/lib/python2.7/site-packages/spotify/utils.py", line 246, in load
    raise spotify.Timeout(timeout)
Timeout: Operation did not complete in 10.000s

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 40 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, yes it was the discover weekly playlist, I and for me it was the second playlist in the array. Also it is the only playlist which fails to load.

@F1ndus Out of interest which playlist is corrupt for you? If I change code slightly to get the index I can match that up with what at play.spotify.com and it corresponds to the Discover Weekly playlist.

def _get_playlist_tracks(config, session):
    if not config['allow_playlists']:
        return

    for i, playlist in enumerate(session.playlist_container):
        if not isinstance(playlist, spotify.Playlist):
            continue
        try:
            playlist.load()
        except spotify.Error:
            logger.error("Failed to load playlist %s (%d)", playlist.name, i)
            continue
        for track in playlist.tracks:
            try:
                track.load()
                yield track
            except spotify.Error:  # TODO Why did we get "General error"?
                continue