Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12: TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist' #437

Open
carlo161 opened this issue Sep 11, 2024 · 0 comments
Labels

Comments

@carlo161
Copy link

I installed last version of pyowm in a virtual environment and I receive the following message:

File "/usr/src/app/classes/weatherScanner.py", line 25, in elementInit
    .weather_manager())
     ^^^^^^^^^^^^^^^^^
  File "/usr/src/app/venv/lib/python3.12/site-packages/pyowm/owm.py", line 127, in weather_manager
    return weather_manager.WeatherManager(self.api_key, self.config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/app/venv/lib/python3.12/site-packages/pyowm/weatherapi25/weather_manager.py", line 32, in __init__
    self.http_client = HttpClient(API_key, config, ROOT_WEATHER_API)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/app/venv/lib/python3.12/site-packages/pyowm/commons/http_client.py", line 127, in __init__
    max_retries=Retry(
                ^^^^^^
TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist'

By googling around I found out that:
From the urllib3 2.0.0 changelog, here's the cause of the issue:

Removed deprecated Retry options method_whitelist, DEFAULT_REDIRECT_HEADERS_BLACKLIST (urllib3/urllib3#2086).

Am I the only one with this issue? Is anyone going to fix the package?

@csparpa csparpa added the bug label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants