-
-
Notifications
You must be signed in to change notification settings - Fork 93
TypeError: int() not supported on cdata 'sp_track *' #128
Comments
Do you get the same error if you upgrade to pyspotify 2.0.0b1 released yesterday? There's some API changes, but porting from 2.0.0a1 to 2.0.0b1 should be quick. |
Yes, it is... working on a fix. |
Fix committed. I'll release this to PyPI in a couple of days, in case more bugs are discovered now right after the 2.0.0b1 release. |
thanks! so can I use track.index for the position? |
Ah, no, If you want to find the first instance of a track in the playlist, you can use |
Ah makes sense. That is great, thank you! |
Ok, maybe... let me know if there is somewhere else you'd like me to ask this: When I do playlist.tracks, I get the list, like this:
with my loaded when I
But if i visually search for the track object in the list, it is there in my output. Thoughts? |
I know what the problem is. Will fix tomorrow :-) Stein Magnus Jodal
|
Hi @jodal, just had a chance to try this again. I am seeing the same results. Any ideas on what exactly I should do to get the track's position? |
Are you sure you updated your git clone first? It seems to work for me: >>> pl = session.playlist_container[0]
>>> pl
Playlist(u'spotify:user:jodal:playlist:6Z6kOmdDygGJLaxcQyc4LA')
>>> pl.tracks
_Tracks([Track(u'spotify:track:4irirDseOIr6JChffMsqKr'),
Track(u'spotify:track:4DPCc9KmNCOVFigrMoCYxe'),
Track(u'spotify:track:3G9RHExOlulJtarVW2SilB'),
Track(u'spotify:track:5qleAb28e763MhBSblRHEj'),
Track(u'spotify:track:2PgnmyrMz2R35ePgyHjlJy'),
Track(u'spotify:track:1HvC7KoIL7nrNzu8AMRMua'),
Track(u'spotify:track:6IdWcwCmPlNVEMoSN7G3EZ'),
Track(u'spotify:track:4AZAeQMDv7yoELcGaRGaIc'),
Track(u'spotify:track:3XEShzCXKzS0J5zjCG3Gyf'),
Track(u'spotify:track:11nPqPZKAJ3meQI7jsWleL'),
Track(u'spotify:track:6lLLu3470SsUcrqt3Ryp5y'),
Track(u'spotify:track:4tSoKbLjO7rdy4bdPUxbop')])
>>> t = pl.tracks[7]
>>> pl.tracks.index(t)
7 |
ah dur, yeah I accidentally reverted to the pip installed version. getting the track position works now! thanks! |
Great! I'll roll a new release tonight, I hope :-) |
When I do
I get the mentioned error in the title. I've verified that track is a valid Track object
Full trace:
The text was updated successfully, but these errors were encountered: