ssut / py-googletrans

(unofficial) Googletrans: Free and Unlimited Google translate API for Python. Translates totally free of charge.
http://py-googletrans.rtfd.io
MIT License
3.85k stars 716 forks source link

Errors are raised on certain text inputs. #412

Open zwanzika-hatzel opened 3 weeks ago

zwanzika-hatzel commented 3 weeks ago

Version: 4.0.0rc1

Code:

from googletrans import Translator translator = Translator() translator.translate("child or my", dest="es")

Error: File "C:\Users\user\Desktop\venv\Lib\site-packages\googletrans\client.py", line 222, in translate translated_parts = list(map(lambda part: TranslatedPart(part[0], part[1] if len(part) >= 2 else []), parsed[1][0][0][5])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable

Itachisann commented 1 week ago

same error with word "finished"