请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

运行时候出现ReadTimeoutError,该怎么解决

from datetime import datetime
from elasticsearch_dsl import DocType, Date, Nested, Boolean, \
    analyzer, InnerObjectWrapper, Completion, Keyword, Text, Integer
from elasticsearch_dsl.connections import connections
connections.create_connection(hosts=["localhost"])

class ArticleType(DocType):
    #伯乐在线文章类型
    title = Text(analyzer="ik_max_word")
    create_date = Date()
    praise_nums = Integer()
    fav_nums = Integer()
    comment_nums = Integer()
    front_image_url = Keyword()
    front_image_path = Keyword()
    url = Keyword()
    url_object_id = Keyword()
    tags = Text(analyzer="ik_max_word")
    content = Text(analyzer="ik_max_word")

    class Meta:
        index = "jobbole"
        doc_type = "article"

if __name__ == "__main__":
    ArticleType.init()

这段代码运行的时候,出现了ReadTimeoutError,该怎么解决。

图片描述

正在回答 回答被采纳积分+3

1回答

提问者 晴天浪浪 2018-11-15 10:08:16

今天早上起来重新运行了一次,就没有这个错误了。。。。。

0 回复 有任何疑惑可以回复我~
  • bobby #1
    timeout一般都是网络问题,没出现就可以先不用管了
    回复 有任何疑惑可以回复我~ 2018-11-16 20:47:29
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号