[GH-ISSUE #1099] playlist_reorder_items not working #656

Closed
opened 2026-02-28 00:00:35 +03:00 by kerem · 5 comments
Owner

Originally created by @lucas992x on GitHub (May 5, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1099

Describe the bug
playlist_reorder_items is not working: code is executed without errors but tracks in playlist are not reordered.

Your code
Minimal working example
Can be tested by inserting ID of any playlist you have permission to edit, just be sure that it contains enough tracks to perform the test (or change indexes). Includes other tools that work: description of playlist is modified and a track is added to it.

Expected behavior
playlist_reorder_items should reorder playlist but this does not happen

Output
There is no output, command seems to be executed (is there something I should do to retrieve more information?)

Environments:

  • Windows, Python 3.11.2, Spotipy 2.22.1 (installed with pip)
  • Debian WSL, Python 3.11.2, Spotipy 2.23.0 (installed from repo with python setup.py install)
  • Arch WSL, Python 3.12.3, Spotipy 2.23.0 (installed from repo with python setup.py install)

Additional context
It was working some days ago, then it stopped all of a sudden.

Originally created by @lucas992x on GitHub (May 5, 2024). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1099 **Describe the bug** `playlist_reorder_items` is not working: code is executed without errors but tracks in playlist are not reordered. **Your code** [Minimal working example](https://pastebin.com/feHvi2VS) Can be tested by inserting ID of any playlist you have permission to edit, just be sure that it contains enough tracks to perform the test (or change indexes). Includes other tools that work: description of playlist is modified and a track is added to it. **Expected behavior** `playlist_reorder_items` should reorder playlist but this does not happen **Output** There is no output, command seems to be executed (is there something I should do to retrieve more information?) **Environments:** - Windows, Python 3.11.2, Spotipy 2.22.1 (installed with `pip`) - Debian WSL, Python 3.11.2, Spotipy 2.23.0 (installed from repo with `python setup.py install`) - Arch WSL, Python 3.12.3, Spotipy 2.23.0 (installed from repo with `python setup.py install`) **Additional context** It was working some days ago, then it stopped all of a sudden.
kerem 2026-02-28 00:00:35 +03:00
  • closed this issue
  • added the
    api-bug
    label
Author
Owner

@dieser-niko commented on GitHub (May 5, 2024):

I was able to replicate the bug in the interactive Web API Reference and it seems to do absolutely nothing.

As a workaround, you can use Spotify.playlist_replace_items, but the functionality is a bit different. The URIs provided will replace the entire playlist, even though the function only supports up to 100 songs/episodes. However, if you provide URIs that are already in the playlist, it will count as reordered.

Probably related to: https://github.com/spotipy-dev/spotipy/issues/1098

<!-- gh-comment-id:2094933201 --> @dieser-niko commented on GitHub (May 5, 2024): I was able to replicate the bug in the interactive [Web API Reference](https://developer.spotify.com/documentation/web-api/reference/reorder-or-replace-playlists-tracks) and it seems to do absolutely nothing. As a workaround, you can use `Spotify.playlist_replace_items`, but the functionality is a bit different. The URIs provided will replace the entire playlist, even though the function only supports up to 100 songs/episodes. However, if you provide URIs that are already in the playlist, it will count as reordered. Probably related to: https://github.com/spotipy-dev/spotipy/issues/1098
Author
Owner

@lucas992x commented on GitHub (May 6, 2024):

I tried playlist_replace_items and it works, thank you for the advice! Unfortunately most of my playlists contain way more than 100 tracks, so I have to wait that Spotify fix the issue :(

<!-- gh-comment-id:2095438560 --> @lucas992x commented on GitHub (May 6, 2024): I tried `playlist_replace_items` and it works, thank you for the advice! Unfortunately most of my playlists contain way more than 100 tracks, so I have to wait that Spotify fix the issue :(
Author
Owner

@jwatson-CO-edu commented on GitHub (May 6, 2024):

I am having the same issue. The authorization request spotipy.util.prompt_for_user_token does not cause any errors. I get the following response despite having correct permission in my token request.

{
  "error": {
    "status": 401,
    "message": "No token provided"
  }
}

An example that was working as of 2 weeks ago can be found here.

<!-- gh-comment-id:2096534465 --> @jwatson-CO-edu commented on GitHub (May 6, 2024): I am having the same issue. The authorization request `spotipy.util.prompt_for_user_token` does not cause any errors. I get the following response despite having correct permission in my token request. ```json { "error": { "status": 401, "message": "No token provided" } } ``` An example that was working as of 2 weeks ago can be [found here](https://github.com/jwatson-CO-edu/yt_shuffle_so_good/blob/main/spotify/03_reorder-PL.ipynb).
Author
Owner

@dieser-niko commented on GitHub (May 6, 2024):

@jwatson-CO-edu it doesn't seem like you're having the same problem. In our case, the API pretends to work, but nothing actually happens.

<!-- gh-comment-id:2096757165 --> @dieser-niko commented on GitHub (May 6, 2024): @jwatson-CO-edu it doesn't seem like you're having the same problem. In our case, the API pretends to work, but nothing actually happens.
Author
Owner

@lucas992x commented on GitHub (May 12, 2024):

Now playlist_reorder_items works again, I close the issue

<!-- gh-comment-id:2106251082 --> @lucas992x commented on GitHub (May 12, 2024): Now `playlist_reorder_items` works again, I close the issue
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#656
No description provided.