Toloka/toloka-kit

TypeError: __init__() got an unexpected keyword argument 'allowed_methods' in v 0.1.23

ZackPashkin opened this issue · 2 comments

toloka-kit==0.1.23
calling client.get_pool(pool_id=settings.pool_id) gives error
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'

I installed the previous version 0.1.22 and get_pool works as expected!

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-7-e4710c779596>](https://localhost:8080/#) in <module>()
     20 
     21 client = TolokaClient(settings.token, 'PRODUCTION')
---> 22 ongoing_pool = client.get_pool(pool_id=settings.pool_id)
     23 if not ongoing_pool.is_closed():
     24     client.close_pool(settings.pool_id)

7 frames
[/usr/local/lib/python3.7/dist-packages/toloka/client/primitives/retry.py](https://localhost:8080/#) in __init__(self, retry_quotas, *args, **kwargs)
     45 
     46         self._last_response = kwargs.pop('last_response', None)
---> 47         super(TolokaRetry, self).__init__(*args, **kwargs)
     48 
     49     def new(self, **kwargs):
Losik commented

Thank you for your feedback!

urllib3 has deprecated method_whitelist in faour of allowed_methods since version 1.26.0 (2020-11-10). My best guess is that TolokaRetry inherited from urllib3.util.Retry produces the error because tour urllib3 version is below 1.26.0. We'll add the minimum urllib3 dependency version in the following release.

Could you please check your installed urllib3 version with pip freeze | grep urllib3 and post the results here?

Now all works fine with the current version!
urllib3==1.25.11
Thank you!