DeepLcom / deepl-python

Official Python library for the DeepL language translation API.
MIT License
1.06k stars 75 forks source link

Exception ignored in: <function Translator.__del__ at 0x7fb336445b80> #73

Open zoobereq opened 1 year ago

zoobereq commented 1 year ago

Hello,

The API works great but after the translation is generated, I'm getting the following:

Exception ignored in: <function Translator.del at 0x7fb336445b80> Traceback (most recent call last): File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/deepl/translator.py", line 506, in del File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/deepl/translator.py", line 713, in close File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/deepl/http_client.py", line 91, in close File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 747, in close File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 325, in close File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/urllib3/poolmanager.py", line 222, in clear File "/Users/littlezub/opt/anaconda3/lib/python3.9/site-packages/urllib3/_collections.py", line 95, in clear TypeError: 'NoneType' object is not callable

Any advice would be appreciated.

JanEbbing commented 1 year ago

Hi, which version of the DeepL library, requests and urllib3 do you have installed in that environment?

zoobereq commented 1 year ago

Hi, and sorry of the delayed reply. Here's the requested info:

Hope this helps.

velochy commented 4 months ago

Ran into the same issue. Problem is the urllib v. 1.26.7, as deepl expects v2. In my case, the old urllib is due to s3fs, which does not work with the new urllib, so it's a sticky situation, but not one of deepl.