[GH-ISSUE #1084] Offset Glitch #644

Closed
opened 2026-02-28 00:00:29 +03:00 by kerem · 3 comments
Owner

Originally created by @ZachEkstrand on GitHub (Apr 7, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1084

Describe the bug
Setting the "offset" arg in the method "current_user_playlists" does not return the list of playlists starting at the correct index.
Giving "offset" the value 42 will start the list at index 42 as expected, however giving "offset" the value 43 will oddly return the list starting at index 42. Any greater number will make it start at the index 1 before.

Your code
This block of code with offset set to 43 has the exact same output:

offset = 42
chunk = sp.current_user_playlists(offset=offset)['items']
for playlist in chunk:
       print(playlist['name'])

Expected behavior
current_users_playlists() should start at the correct offset

Output
42. Emo
43. Bren Lukens
44. Jake Ewald
45. Jesse Lacey
46. Summer
47. Kevin Parker
48. Love Songs
49. The Strokes

Environment:

  • OS: Windows 10
  • Python 3.12.1
  • spotipy version 2.23.0
  • Visual Studio Code
Originally created by @ZachEkstrand on GitHub (Apr 7, 2024). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1084 **Describe the bug** Setting the "offset" arg in the method "current_user_playlists" does not return the list of playlists starting at the correct index. Giving "offset" the value 42 will start the list at index 42 as expected, however giving "offset" the value 43 will oddly return the list starting at index 42. Any greater number will make it start at the index 1 before. **Your code** This block of code with offset set to 43 has the exact same output: ```python offset = 42 chunk = sp.current_user_playlists(offset=offset)['items'] for playlist in chunk: print(playlist['name']) ``` **Expected behavior** current_users_playlists() should start at the correct offset **Output** 42. Emo 43. Bren Lukens 44. Jake Ewald 45. Jesse Lacey 46. Summer 47. Kevin Parker 48. Love Songs 49. The Strokes **Environment:** - OS: Windows 10 - Python 3.12.1 - spotipy version 2.23.0 - Visual Studio Code
kerem 2026-02-28 00:00:29 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@dieser-niko commented on GitHub (Apr 29, 2024):

It seems to be a problem with the API rather than the library. You could try using the Spotify Web API documentation to check if it's an API issue.

I can't replicate it for myself as I don't have that many playlists in my library.

<!-- gh-comment-id:2082091417 --> @dieser-niko commented on GitHub (Apr 29, 2024): It seems to be a problem with the API rather than the library. You could try using the [Spotify Web API documentation](https://developer.spotify.com/documentation/web-api/reference/get-a-list-of-current-users-playlists) to check if it's an API issue. I can't replicate it for myself as I don't have that many playlists in my library.
Author
Owner

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

Any updates so far?

<!-- gh-comment-id:2126676104 --> @dieser-niko commented on GitHub (May 23, 2024): Any updates so far?
Author
Owner

@dieser-niko commented on GitHub (Jul 31, 2024):

Due to the lack of activity, I'm going to close this topic. Please reopen if it's still happening, and try it out in the API documentation as well.

<!-- gh-comment-id:2260220312 --> @dieser-niko commented on GitHub (Jul 31, 2024): Due to the lack of activity, I'm going to close this topic. Please reopen if it's still happening, and try it out in the API documentation as well.
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#644
No description provided.