mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #769] TypeError: __init__() got an unexpected keyword argument 'allowed_methods' #470
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#470
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 @SeyiAgboola on GitHub (Jan 12, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/769
Describe the bug
I receive a TypeError when running the Spotify Credentials:
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id=client_id,
client_secret=client_secret))
Your code
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
client_credentials_manager = SpotifyClientCredentials(client_id=client_id, client_secret=client_secret)
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
Expected behavior
No error.
Output
TypeError Traceback (most recent call last)
in ()
9
10 sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id=client_id,
---> 11 client_secret=client_secret))
12
13 #Choose your artist via input
1 frames
/usr/local/lib/python3.7/dist-packages/spotipy/client.py in init(self, auth, requests_session, client_credentials_manager, oauth_manager, auth_manager, proxies, requests_timeout, status_forcelist, retries, status_retries, backoff_factor, language)
164 else:
165 if requests_session: # Build a new session.
--> 166 self._build_session()
167 else: # Use the Requests API module as a "session".
168 self._session = requests.api
/usr/local/lib/python3.7/dist-packages/spotipy/client.py in _build_session(self)
198 status=self.status_retries,
199 backoff_factor=self.backoff_factor,
--> 200 status_forcelist=self.status_forcelist)
201
202 adapter = requests.adapters.HTTPAdapter(max_retries=retry)
TypeError: init() got an unexpected keyword argument 'allowed_methods'
Environment:
Additional context
It was working fine last week
@djlindsay87 commented on GitHub (Apr 17, 2022):
I'm having this error too and it was working fine two days ago. Have you resolved this yet? It's really being a buzzkill.