mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #1020] Duplicate playlists created even when I check if the playlist exists #604
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#604
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arsaboo on GitHub (Aug 20, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1020
Describe the bug
I am trying to create a Spotify playlist. Basically, I check if the playlist exists or not. If it exists, just add the tracks to that playlist otherwise create a new one. However, it always creates a new playlist with the same name. The function is part of a project and
self.spis the Spotify object.The weird thing is
playlist_existsisTrueeven when the playlist does not exist.Your code
Here is the scope that I am using:
Expected behavior
Duplicate playlists should not be created.
Output
In the debug logs, I can see a playlist_id that is actually created new but it shows as pre-existing: