我textblob
在 Windows 上使用 Python 2.7.10 已经有一段时间了,出乎意料的是,它停止了工作。使用两个独立的虚拟机以及在 OS X 上进行测试会产生相同的错误。
测试文档中的一个简单片段:
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.
如何调试此错误?