[GH-ISSUE #242] Problem creating a new playlist #127

Closed
opened 2026-02-27 23:20:58 +03:00 by kerem · 5 comments
Owner

Originally created by @sheheryarbutt on GitHub (Jan 2, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/242

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!

image

image

Originally created by @sheheryarbutt on GitHub (Jan 2, 2018). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/242 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! ![image](https://user-images.githubusercontent.com/31780904/34479040-5ad21a72-ef72-11e7-999b-50f4ea244ab1.png) ![image](https://user-images.githubusercontent.com/31780904/34479138-e364ab48-ef72-11e7-8ae8-75ae98b83ace.png)
kerem closed this issue 2026-02-27 23:20:58 +03:00
Author
Owner

@ritiek commented on GitHub (Jan 2, 2018):

Similar issue with passing parameters to function as https://github.com/plamere/spotipy/issues/230#issuecomment-353485277.

Check how user_playlist_create() is defined: github.com/plamere/spotipy@4c2c1d763a/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)
<!-- gh-comment-id:354764118 --> @ritiek commented on GitHub (Jan 2, 2018): 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: ```python playlists = sp.user_playlist_create(username, playlist_name, public=False, description=playlist_description) ```
Author
Owner

@sheheryarbutt commented on GitHub (Jan 2, 2018):

@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!

<!-- gh-comment-id:354856767 --> @sheheryarbutt commented on GitHub (Jan 2, 2018): @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!
Author
Owner

@ucalyptus commented on GitHub (Oct 14, 2018):

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.

<!-- gh-comment-id:429620706 --> @ucalyptus commented on GitHub (Oct 14, 2018): 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.
Author
Owner

@CarissaThomas commented on GitHub (Nov 23, 2018):

@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.

<!-- gh-comment-id:441299150 --> @CarissaThomas commented on GitHub (Nov 23, 2018): @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.
Author
Owner

@mbirgi commented on GitHub (Feb 17, 2019):

@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.

<!-- gh-comment-id:464430419 --> @mbirgi commented on GitHub (Feb 17, 2019): @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](https://github.com/plamere/spotipy/issues/211#issuecomment-369863112) solved the issue for me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#127
No description provided.