I have no issue looking through all the tracks in my playlist but when I try to create a new playlist this happens. Any help would be appreciated!


Similar issue with passing parameters to function as https://github.com/plamere/spotipy/issues/230#issuecomment-353485277.
Check how user_playlist_create() is defined: https://github.com/plamere/spotipy/blob/4c2c1d763a3653aa225c4af848409ec31286a6bf/spotipy/client.py#L403
So, you need to call sp.user_playlist_create() like below:
playlists = sp.user_playlist_create(username, playlist_name, public=False, description=playlist_description)
@ritiek so I tried what you said but it gives me an error "TypeError: user_playlist_create() got an unexpected keyword argument 'description'" I found out that you don't pass the description anymore and its just the first 3 parameters, ty for the help!
any updates?
even I ran into this
SpotifyException: http status: 400, code:-1 - https://api.spotify.com/v1/users/francocasadei/playlists/3lDhWGsVYxWGXFKtJvI7cv/tracks:
Error parsing JSON.
@ucalyptus I fixed this by creating my token as such:
token = util.prompt_for_user_token(username=username, scope='playlist-modify-public', client_id=client_id, client_secret=client_secret, redirect_uri="http://whatever/")
Setting the scope parameter to 'playlist-modify-public' allowed me to create a public playlist without the SpotifyException: http status: 400, code:-1 - error.
@sheheryarbutt I don't understand why you are saying that description is not passed anymore (https://github.com/plamere/spotipy/issues/242#issuecomment-354856767), the signature of the method "user_playlist_create(...)" still has the "description" param. But I am also getting this:
TypeError: user_playlist_change_details() got an unexpected keyword argument 'description'
Edit: I have found out that this problem is related to issue #211. Following this suggestion solved the issue for me.
Most helpful comment
@ritiek so I tried what you said but it gives me an error "TypeError: user_playlist_create() got an unexpected keyword argument 'description'" I found out that you don't pass the description anymore and its just the first 3 parameters, ty for the help!