Open marcswan opened 3 years ago
Hello. If you do pip list
or pip3 list
, what version do you have for requests
and urllib3
? You should have urllib3>=1.26
and requests>=2.25
Hello. If you do
pip list
orpip3 list
, what version do you have forrequests
andurllib3
? You should haveurllib3>=1.26
andrequests>=2.25
Oh, thank you. I've upgraded urllib3 and now it's working!
It's strange though, it should have updated automatically when doing pip3 install spotipy --upgrade
Let's see if someone else complains about it
Hello, I also encounter the same error message as mentioned above. Upgrading urllib3 fix the error.
Urllib3 was not updated automatically when I update this package. Here's the output when I updated Spotipy package.
pip install --upgrade spotipy --user Collecting spotipy Downloading spotipy-2.17.0-py3-none-any.whl (26 kB) Collecting six>=1.15.0 Using cached six-1.15.0-py2.py3-none-any.whl (10 kB) Collecting requests>=2.25.0 Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\users\agast\appdata\roaming\python\python36\site-packages (from requests>=2.25.0->spotipy) (2019.6.16) Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in c:\users\agast\appdata\roaming\python\python36\site-packages (from requests>=2.25.0->spotipy) (2.8) Requirement already satisfied, skipping upgrade: chardet<5,>=3.0.2 in c:\users\agast\appdata\roaming\python\python36\site-packages (from requests>=2.25.0->spotipy) (3.0.4) Requirement already satisfied, skipping upgrade: urllib3<1.27,>=1.21.1 in c:\users\agast\appdata\roaming\python\python36\site-packages (from requests>=2.25.0->spotipy) (1.25.3) Installing collected packages: six, requests, spotipy Attempting uninstall: six Found existing installation: six 1.12.0 Uninstalling six-1.12.0: Successfully uninstalled six-1.12.0 Attempting uninstall: requests Found existing installation: requests 2.22.0 Uninstalling requests-2.22.0: Successfully uninstalled requests-2.22.0 Attempting uninstall: spotipy Found existing installation: spotipy 2.16.1 Uninstalling spotipy-2.16.1: Successfully uninstalled spotipy-2.16.1 Successfully installed requests-2.25.1 six-1.15.0 spotipy-2.17.0
requests 2.25.0 wasn't forcing update of urllib3 to 1.26.0.
Should be fine now on spotipy 2.17.1
pip3 install spotipy --upgrade
Thanks for reporting!
oh i got a little tip on this error, if you're outside of the countries that spotify works eg [ US, France etc ], you'd get this error without a vpn, just use vpn and it'll work :)
This error was caused by using the wrong version of urllib3. How could it have anything to do with the country that you are in? The error occurs before any web API requests are even made.
Good night people, I have the same problem as @marcswan and even upgrading the pip and updating urllib3 and requests, it still gives me the same problem 'init() got an unexpected keyword argument 'allowed_methods'
Would there be another way to resolve this error?
Hello. If you do
pip list
orpip3 list
, what version do you have forrequests
andurllib3
? You should haveurllib3>=1.26
andrequests>=2.25
@jenniferstefaniks can you please answer the question above and we'll try to help
Good night, they are in the current version. urllib3>=1.26.0 requests>=2.25.0 I'm using collab notebook
Em sáb., 21 de ago. de 2021 às 21:56, Stéphane Bruckert < @.***> escreveu:
Hello. If you do pip list or pip3 list, what version do you have for requests and urllib3? You should have urllib3>=1.26 and requests>=2.25
@jenniferstefaniks https://github.com/jenniferstefaniks can you please answer the question above and we'll try to help
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/plamere/spotipy/issues/647#issuecomment-903195513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDU5BSMUC77VZ2LZ2DTAE3T6BDM3ANCNFSM4YK7V6GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Hi,
I am receiving the same error message.
spotipy, requests and urllib3 are up to date: spotipy 2.19.0 urllib3 1.26.6 requests 2.26.0
I'm using ubuntu EC2 AWS with Python 3.8.10.
Traceback (most recent call last): File "main.py", line 197, in <module> trackIds = populateTrackIds() File "main.py", line 57, in populateTrackIds sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="b95eb7c97a4f4bd5a13ab9da3aad447d", File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 166, in __init__ self._build_session() File "/usr/local/lib/python3.8/dist-packages/spotipy/client.py", line 193, in _build_session retry = urllib3.Retry( TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
On colab:
!pip install urllib3 --upgrade
!pip install requests --upgrade
!pip install spotipy --upgrade
Then restart the runtime for it to work.
hello ! Same thing for me. All my versions have been upgraded
@sebastienmaurette please share your versions of requests and urllib3
Hello. If you do
pip list
orpip3 list
, what version do you have forrequests
andurllib3
? You should haveurllib3>=1.26
andrequests>=2.25
requests==2.27.1
urllib3==1.26.8
spotipy==2.19.0
pip3 install -U requests urllib3 spotipy
have not solved the issue, sadly
line 193, in _build_session
retry = urllib3.Retry(
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
TypeError: Client.__init__() got an unexpected keyword argument 'session_name'
When this code
QueueDB = {} ReplyDB = {} FormtDB = {} NubBot = Client( session_name=Config.SESSION_NAME, api_id=int(Config.API_ID), api_hash=Config.API_HASH, bot_token=Config.BOT_TOKEN )
Having this error in google colab
Hi, i started to get this error after update. Month ago it worked perfectly fine. I am new to python so maybe i am doing something wrong.
And I get this response
When I changed it to this as in docs
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id = 'my_client_id', client_secret = 'my_client_secret'))
i still have the same error.