[GH-ISSUE #622] delete_a_saved_track example fails #371

Closed
opened 2026-02-27 23:22:16 +03:00 by kerem · 4 comments
Owner

Originally created by @t0000 on GitHub (Dec 3, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/622

Hello

When executing the script, the track is not deleted from the saved tracks

https://github.com/plamere/spotipy/blob/2.16.1/examples/delete_a_saved_track.py

no error is output -> Process finished with exit code 0

Environment:
Python version [3.9.0]
spotipy version [2.16.1]

Originally created by @t0000 on GitHub (Dec 3, 2020). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/622 Hello When executing the script, the track is not deleted from the saved tracks https://github.com/plamere/spotipy/blob/2.16.1/examples/delete_a_saved_track.py no error is output -> Process finished with exit code 0 Environment: Python version [3.9.0] spotipy version [2.16.1]
kerem 2026-02-27 23:22:16 +03:00
Author
Owner

@stephanebruckert commented on GitHub (Dec 3, 2020):

Yes the file has an indent problem, just unindent the last 3 lines, they shouldn't be part of the "else"

<!-- gh-comment-id:738304461 --> @stephanebruckert commented on GitHub (Dec 3, 2020): Yes the file has an indent problem, just unindent the last 3 lines, they shouldn't be part of the "else"
Author
Owner

@t0000 commented on GitHub (Dec 4, 2020):

with this code: https://pastebin.com/qCqC29M4

i get this error: https://pastebin.com/NhQQj58a

can you check that please? Regards

<!-- gh-comment-id:738645708 --> @t0000 commented on GitHub (Dec 4, 2020): with this code: https://pastebin.com/qCqC29M4 i get this error: https://pastebin.com/NhQQj58a can you check that please? Regards
Author
Owner

@t0000 commented on GitHub (Dec 5, 2020):

the solution is:
results = sp.current_user_saved_tracks_delete(tracks=[tids])

<!-- gh-comment-id:739416977 --> @t0000 commented on GitHub (Dec 5, 2020): the solution is: results = sp.current_user_saved_tracks_delete(tracks=[tids])
Author
Owner

@stephanebruckert commented on GitHub (Dec 5, 2020):

@t0000 nice catch, thanks for the solution.

Just reopening this until we fix it through a PR

<!-- gh-comment-id:739432243 --> @stephanebruckert commented on GitHub (Dec 5, 2020): @t0000 nice catch, thanks for the solution. Just reopening this until we fix it through a PR
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#371
No description provided.