python translating from arabic to english using TextBlob

Viewed 210

im trying to translate some sentences by using textblob from arabic to english,it was working when suddenly i started getting this errors

from textblob import TextBlob

en_blob = TextBlob(u'انا سعيد') 

print(en_blob.translate(to='en'))

getting this error


  File "C:\Users\USER\Anaconda3\lib\site-packages\textblob\translate.py", line 61, in translate
    self._validate_translation(source, result)

  File "C:\Users\USER\Anaconda3\lib\site-packages\textblob\translate.py", line 84, in _validate_translation
    if result.strip() == source.strip():

AttributeError: 'list' object has no attribute 'strip'
0 Answers
Related