我一直在Windows上使用Python 2.7.10中的textblob
已经有一段时间了,但出乎意料地它停止工作了。在两个独立的虚拟机以及OS X上进行测试都会产生相同的错误。
从docs中测试一个简单的片段:
from textblob import TextBlob
en_blob = TextBlob(u'Simple is better than complex.')
print(en_blob.translate(to='es'))
产生一个错误:
File "test.py", line 3, in <module> print(en_blob.translate(to='es'))
File "C:\Python27\lib\site-packages\textblob\blob.py", line 509, in translate
from_lang=from_lang, to_lang=to))
File "C:\Python27\lib\site-packages\textblob\translate.py", line 45, in translate
raise NotTranslated('Translation API returned the input string unchanged.')
textblob.exceptions.NotTranslated: Translation API returned the input string
unchanged.
我该如何调试这个错误?