我在使用TextBlob库时遇到一些问题。我尝试运行一段非常简单的代码,如下所示:
from textblob import TextBlob
text = 'this is just a test'
blob = TextBlob(text)
blob.detect_language()
它不断地给我这个错误:
/usr/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
647 class HTTPDefaultErrorHandler(BaseHandler):
648 def http_error_default(self, req, fp, code, msg, hdrs):
--> 649 raise HTTPError(req.full_url, code, msg, hdrs, fp)
650
651 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 404: Not Found
有什么问题?我在几个设备上试过,每次都会出现同样的错误
谢谢
函数
dectect_language()
向谷歌翻译服务发送请求:http://translate.google.com/translate_a/t?client=webapp&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&dt=at&ie=UTF-8&oe=UTF-8&otf=2&ssel=0&tsel=0&kc=1&sl=auto&tk=276174.132528
这个url返回404
来自detect_language()的文档
我不会指望这个函数将来会起作用
相关问题 更多 >
编程相关推荐