deep-translator icon indicating copy to clipboard operation
deep-translator copied to clipboard

Bug in Yandex Translator `translate` method

Open RodionfromHSE opened this issue 1 year ago • 1 comments

  • deep_translator version: 1.11.4
  • Python version: 3.10
  • Operating System: Mac OS M2

Description

Yandex Translator translate method returns a list, not a str.

What I Did

To fix it change return statement on line 142 in current version from return response["text"] to return response["text"][0] in file $DIRECTORY/deep_translator/yandex.py

RodionfromHSE avatar Jan 07 '24 15:01 RodionfromHSE

Thanks for noticing this. Do you want to open a fix PR for it?

nidhaloff avatar Feb 18 '24 19:02 nidhaloff