It works perfectly when i use small words
But when i use a sentence
Code:
from translate import Translator
translator = Translator(to_lang="ml")
trns= translator.translate("ithane malayalam")
Traceback:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/translate.py", line 45, in
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/providers/mymemory_translated.py", line 49, in get_translation
next_best_match = next(match for match in matches)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "", line 1, in
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
RuntimeError: generator raised StopIteration
It works perfectly when i use small words But when i use a sentence
Code:
Traceback:
Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/translate.py", line 45, in
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/providers/mymemory_translated.py", line 49, in get_translation
next_best_match = next(match for match in matches)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "", line 1, in
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/translate/translate.py", line 45, in translate
return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
RuntimeError: generator raised StopIteration