Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

textblob error 'list' object has no attribute 'strip'

1

I'm using TextBlob to translate some text , it worked fine till I tested it today ... I'm using python 3 textblob Version: 0.15.3. Is there a new update or something like that ?

like image 844
Firas Ben Younes Avatar asked Oct 23 '25 14:10

Firas Ben Younes


1 Answers

I suggest that you explicitly specify the input language

blob = TextBlob("hello")
blob.translate(from_lang='en', to='fr')

Here is the output

TextBlob("bonjour")
like image 147
Keliggg Avatar answered Oct 26 '25 12:10

Keliggg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!