[GH-ISSUE #775] Problem to add episode with playlist_add_items #477

Closed
opened 2026-02-27 23:22:50 +03:00 by kerem · 1 comment
Owner

Originally created by @VeirichR on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/775

Im having trouble with playlist_add_items on spotipy, im trying to add episodes to a new playlist

tt = ['https://open.spotify.com/episode/3nwfTNjbhDu8Cnp81TdmGO', 'https://open.spotify.com/episode/3jZ5bleO9SCYZ0akgXhmpX']
sp.playlist_add_items(playlist_id=new_playlist_id_, items=tt)

I tryed with episode URLs, IDs and URIs and allways get this error:
Expected id of type track but found type episode https://open.spotify.com/episode/3nwfTNjbhDu8Cnp81TdmGO
Expected id of type track but found type episode https://open.spotify.com/episode/3jZ5bleO9SCYZ0akgXhmpX

And this is what the documentation say:

playlist_add_items(playlist_id, items, position=None)
Adds tracks/episodes to a playlist

Parameters:
playlist_id - the id of the playlist
items - a list of track/episode URIs, URLs or IDs
position - the position to add the tracks

I tryed the same code with songs URLs and it works...

Originally created by @VeirichR on GitHub (Jan 25, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/775 <!--- Please make sure you've: - read the FAQ https://github.com/plamere/spotipy/blob/master/FAQ.md - read the documentation https://spotipy.readthedocs.io/en/latest/ - searched older issues If your question is about code, please share the code you are using ---> Im having trouble with playlist_add_items on spotipy, im trying to add episodes to a new playlist ``` tt = ['https://open.spotify.com/episode/3nwfTNjbhDu8Cnp81TdmGO', 'https://open.spotify.com/episode/3jZ5bleO9SCYZ0akgXhmpX'] sp.playlist_add_items(playlist_id=new_playlist_id_, items=tt) ``` I tryed with episode URLs, IDs and URIs and allways get this error: `Expected id of type track but found type episode https://open.spotify.com/episode/3nwfTNjbhDu8Cnp81TdmGO` `Expected id of type track but found type episode https://open.spotify.com/episode/3jZ5bleO9SCYZ0akgXhmpX` And this is what the documentation say: ``` playlist_add_items(playlist_id, items, position=None) Adds tracks/episodes to a playlist Parameters: playlist_id - the id of the playlist items - a list of track/episode URIs, URLs or IDs position - the position to add the tracks ``` I tryed the same code with songs URLs and it works...
kerem 2026-02-27 23:22:50 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@stephanebruckert commented on GitHub (Jan 25, 2022):

@VeirichR what was the fix?

<!-- gh-comment-id:1021626210 --> @stephanebruckert commented on GitHub (Jan 25, 2022): @VeirichR what was the fix?
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#477
No description provided.