为什么在使用TextBlob时会出现HTTP错误?

2024-09-27 16:19:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我在使用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

有什么问题?我在几个设备上试过,每次都会出现同样的错误

谢谢


Tags: textselfhttpdefault错误codemsgerror

热门问题