mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #505] HTTPError: 405 Client Error: Method Not Allowed #301
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#301
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 @dursab on GitHub (May 30, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/505
Hello, I am trying to delete songs from a playlist with Spotipy and I end up getting the same error as several peoples described in other issues : http status: 405, code:-1
I tried many adjustments in my script following what had been said in these other issues but no luck so far.
Here is the code that I'm using:
and here is the error message I receive:
All the process for the credentials seemed to work fine cause the all script is working until the very last line above :
So it seems that I can access everything but just not interact with it... could it be an issue link to the Authorization Flows? What I understand is that the Authorization Code is giving full access, is it what the prompt_for_user_token is doing?
I can see some similar issues but I couldn't find a way to make it works when following the indications given...
I believe that I'm using the Spotipy version 2.12.0 and python 3.8
Thanks in advance for anyone help!
Originally posted by @dursab in https://github.com/plamere/spotipy/issues/380#issuecomment-632983567
@IdmFoundInHim commented on GitHub (Jun 19, 2020):
@dursab
Your problem may be that you are passing a string as
trackIDwhen the method expects a list@dursab commented on GitHub (Jun 21, 2020):
Hello @IdmFoundInHim
I just tried this :
so my now
listTrackis a list of all the track I wish to delete, but I get the exact same error as before...Is that what you were thinking or did I misunderstood?
@stephanebruckert commented on GitHub (Jun 21, 2020):
I think that your username is wrong, it should not be your nickname e.g.
dursabbut instead it should be your ID and should look like a weird sequence of characters e.g.hecpfc6jc5zbm5330hsx9e0rsOnce auth is successful and just before calling
user_playlist_remove_all_occurrences_of_tracks, get your username using:Here is a full example https://github.com/plamere/spotipy/blob/master/examples/remove_specific_tracks_from_playlist.py
@dursab commented on GitHub (Jun 22, 2020):
Thanks @stephanebruckert, everything is working now.
So the thing is my username was actually a mix between nickname and sequence of characters from the start
xxxx?si=jkfninewKFJdsjdso55f665but when I actually use the command line you suggested
username = sp.me()['id']it's actually returning just the nickname partxxxx.Thanks a lot for your help.