Hi,
I'm trying to reorder a playlist I retrieved, but keep on getting the following error :
File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 272, in reorder_tracks
new_index))
File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 58, in wrapper
return f(*args, **kwargs)
TypeError: int() not supported on cdata 'sp_track *'
The code is reordering a playlist retrieved previously:
playlist = session.get_playlist(playlistURI)
playlist.load()
playlist.reorder_tracks(playlist.tracks, tracksToSortIndex)
with tracksToSortIndex being a list of index [2, 1, 0, 3, 5, 4, 6] the same size as the playlist.tracks playlist.
The tracks is a valid list of track :
_Tracks([Track(u'spotify:track:3rfPymjrNU59M5PaTw3ZQn'),
Track(u'spotify:track:6hxHtk3eMy1tWwIBgYeYoY'),
Track(u'spotify:track:6Fl2SdGRGMH5G0BsbwzVH6'),
Track(u'spotify:track:5SWtM7JOkCyTjrSoHoBymx'),
Track(u'spotify:track:6b7z3keZ5gDJ2zBnyrke9P'),
Track(u'spotify:track:7BnJoLoOxYrNxzo6Hs0J7k')])
This also happens if I reorder a specific task:
File "NovaSpotifyPlaylist.py", line 107, in pushTrackPlaylist
playlist.reorder_tracks(playlist.tracks[1], 2)
File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 272, in reorder_tracks
new_index))
File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 58, in wrapper
return f(*args, **kwargs)
TypeError: int() not supported on cdata 'sp_track *'
Any idea where this error comes from?
Hi,
I'm trying to reorder a playlist I retrieved, but keep on getting the following error :
The code is reordering a playlist retrieved previously:
with tracksToSortIndex being a list of index [2, 1, 0, 3, 5, 4, 6] the same size as the playlist.tracks playlist.
The tracks is a valid list of track :
This also happens if I reorder a specific task:
Any idea where this error comes from?