New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown playlist type PLACEHOLDER #159

Closed
rckclmbr opened this Issue May 8, 2015 · 1 comment

Comments

2 participants
@rckclmbr

rckclmbr commented May 8, 2015

In rckclmbr/pyportify#25, someone has a playlist of type PLACEHOLDER, which is actually a documented playlist type, although I can't for the life of me figure out what it is.

You have it listed as a playlist type, but aren't handling it when loading

Any idea on how to resolve this?

2015-05-08 13:36:48,698 - pyportify.views - ERROR - Exception on /spotify/playlists [GET]
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Library/Python/2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Library/Python/2.7/site-packages/pyportify/views.py", line 142, in spotify_playlists
    ret_playlists = fetch_spotify_playlists()
  File "/Library/Python/2.7/site-packages/pyportify/views.py", line 156, in fetch_spotify_playlists
    for playlist in playlists:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.py", line 581, in __iter__
    v = self[i]
  File "/Library/Python/2.7/site-packages/spotify/__init__.py", line 60, in wrapper
    return f(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/spotify/playlist_container.py", line 193, in __getitem__
    raise spotify.Error('Unknown playlist type: %r' % playlist_type)
Error: Unknown playlist type: <PlaylistType.PLACEHOLDER: 3>
127.0.0.1 - - [2015-05-08 13:36:48] "GET /spotify/playlists HTTP/1.1" 500 412 0.038552
@jodal

This comment has been minimized.

Member

jodal commented May 8, 2015

According to the libspotify docs:

SP_PLAYLIST_TYPE_PLACEHOLDER Unknown entry.

So I guess all we can do is to ignore it instead of crashing.

@jodal jodal added this to the v2.0.0 milestone May 8, 2015

@jodal jodal self-assigned this May 8, 2015

@jodal jodal added the bug label May 8, 2015

@jodal jodal closed this in f8224e8 May 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment