[GH-ISSUE #773] Offset in playlist_items not working #473

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

Originally created by @dahunni on GitHub (Jan 20, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/773

issue
No matter what I try, I always get the same tracks in return

def listtracks(list):
    for idx, track in enumerate(list):
        print(idx, track)
playlist = 'xxxxxxxxxxxxx(playlist with more than 100 tracks)'
offset = 30
playlist_items = sp.playlist_items(playlist, limit=100, offset=offset)
listtracks(playlist_items['tracks']['items'])

Expected behavior
incresing the offset should give me a different set of tracks

Output
I always get the same output of tracks
Environment:

  • OS: Mac OS 12.0 Beta (ARM)
  • Python version [3.9]
  • spotipy version [2.19]
  • your IDE (if using any) [PyCharm]

Additional context
Problem does not exist with a direct api call using the Spotify developer console

Originally created by @dahunni on GitHub (Jan 20, 2022). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/773 **issue** No matter what I try, I always get the same tracks in return ``` def listtracks(list): for idx, track in enumerate(list): print(idx, track) playlist = 'xxxxxxxxxxxxx(playlist with more than 100 tracks)' offset = 30 playlist_items = sp.playlist_items(playlist, limit=100, offset=offset) listtracks(playlist_items['tracks']['items']) ``` **Expected behavior** incresing the offset should give me a different set of tracks **Output** I always get the same output of tracks **Environment:** - OS: Mac OS 12.0 Beta (ARM) - Python version [3.9] - spotipy version [2.19] - your IDE (if using any) [PyCharm] **Additional context** Problem does not exist with a direct api call using the Spotify developer console
kerem 2026-02-27 23:22:50 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Peter-Schorn commented on GitHub (Jan 20, 2022):

The issue is that the identifier you're using for the playlist is malformed. Post the identifier.

<!-- gh-comment-id:1017434718 --> @Peter-Schorn commented on GitHub (Jan 20, 2022): The issue is that the identifier you're using for the playlist is malformed. Post the identifier.
Author
Owner

@dahunni commented on GitHub (Jan 20, 2022):

The playlist identifier I am using is 1v1rhlhXhgSNkPux9G5qBV?si=066ae87471d945bd
Correct would be 1v1rhlhXhgSNkPux9G5qBV

Thank you so much this was driving me insane I was troubleshooting for hours now. That also explains some other problems I was facing but it was a bit strange that I was getting any results at all.

<!-- gh-comment-id:1017445251 --> @dahunni commented on GitHub (Jan 20, 2022): The playlist identifier I am using is `1v1rhlhXhgSNkPux9G5qBV?si=066ae87471d945bd` Correct would be 1v1rhlhXhgSNkPux9G5qBV Thank you so much this was driving me insane I was troubleshooting for hours now. That also explains some other problems I was facing but it was a bit strange that I was getting any results at all.
Author
Owner

@Peter-Schorn commented on GitHub (Jan 20, 2022):

but it was a bit strange that I was getting any results at all.
See https://github.com/plamere/spotipy/issues/763#issuecomment-1003441199

<!-- gh-comment-id:1017449170 --> @Peter-Schorn commented on GitHub (Jan 20, 2022): > but it was a bit strange that I was getting any results at all. See https://github.com/plamere/spotipy/issues/763#issuecomment-1003441199
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#473
No description provided.