Rspotify
Rspotify copied to clipboard
getPlaylistSongs error
songs <- getPlaylistSongs("1121836615", "1m2XNEXbhqTGQR1x8pT2EI", token = keys, offset = 301)
produces error:
Error in
[.data.frame(data.frame(json2$track$artists[x])$id, 1) : undefined columns selected
Suspect something in the album_id
and/or artist_id
data that breaks it.
Turns out with 99% certainty that the error is generated by an album on the list that spotify does not have in its library yet. Ie a local album. Guessing it generates NULLs for the id variables but it does have the album, artist etc, and those cases would need to be handled as NAs in the dataframe.