GithubHelp home page GithubHelp logo

Comments (4)

guowang23333 avatar guowang23333 commented on July 28, 2024

可以选择删掉cxapi/jobs/video.py的89行直接跳过预拉取失败,这个办法并不能解决拉取出错的问题,但是可以直接跳过预拉取出错的视频,属于是一个关闭保险丝的操作了,但是经过实测,预拉取失败并不影响之后的正常拉去视频

from cxkitty.

smallwhitedesu1 avatar smallwhitedesu1 commented on July 28, 2024

from cxkitty.

wanghurui avatar wanghurui commented on July 28, 2024

在闯关模式下,上一个题目在题库中未搜索到答案,自动进入下一课程章节时,会出现视频预拉取出错。

请输入欲完成的课程 (序号/名称/id), 输入q退出:0
╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮╭─────────────────────── 《军事理论》章节列表 ───────────────────────╮
│ 试题《12.20》已结束, 课间等待14/15s                                                                   ││    12.13:***军事**的历史地位与现实意义...    ...任务点2/2     │
│                                                                                                       ││    12.14:***新时期军队建设**的形成...    ...任务点2/2         │
│                                                                                                       ││    12.15:***新时期军队建设**的主要内容(上)...               │
│                                                                                                       ││ ...任务点2/2                                                       │
│                                                                                                       ││    12.16:***新时期军队建设**的主要内容(下)...               │
│                                                                                                       ││ ...任务点2/2                                                       │
│                                                                                                       ││    12.17:***新时期军队建设**的历史地位和实践意义...           │
│                                                                                                       ││ ...任务点2/2                                                       │
│                                                                                                       ││    12.18:***国防和军队建设**的科学含义...    ...任务点2/2     │
│                                                                                                       ││    12.19:***国防和军队建设**产生的时代背景...    ...任务点2/2 │
│                                                                                                       ││    12.20:***国防和军队建设**的主要内容...    ...任务点1/2     │
│                                                                                                       ││ ❱  12.21:***国防和军队建设**的地位与作用...    ...任务点0/0   │
│                                                                                                       ││    12.22:胡锦涛关于国防和军队建设重要论述(上)...    ...任务点0/0 │
│                                                                                                       ││    12.23:胡锦涛关于国防和军队建设重要论述(下)...    ...任务点0/0 │
│                                                                                                       ││    12.24:胡锦涛关于国防和军队建设重要论述的地位与作用...           │
│                                                                                                       ││ ...任务点0/0                                                       │
│                                                                                                       ││    12.25:***强军**的核心内容    ...任务点0/0                  │
│                                                                                                       ││    12.26:***强军**在国防和军队建设中的指导地位与...           │
│                                                                                                       ││ ...任务点0/0                                                       │
│                                                                                                       ││  13:战争概述    ...任务点0/0                                       │
│                                                                                                       ││    13.1:战争的内涵与特点    ...任务点0/0                           │
│                                                                                                       ││                                                                    │
│                                                                                                       ││                                                                    │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯╰────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/whr0622/CxKitty/cxapi/jobs/video.py:95 in pre_fetch                                        │
│                                                                                                  │
│    92 │   │   │   ):                                                                             │
│    93 │   │   │   │   attachment = json.loads(r.group(1))                                        │
│    94 │   │   │   else:                                                                          │
│ ❱  95 │   │   │   │   raise ValueError                                                           │
│    96 │   │   │   self.logger.debug(f"attachment: {attachment}")                                 │
│    97 │   │   │   self.fid = attachment["defaults"]["fid"]                                       │
│    98 │   │   │   # 定位资源objectid                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/whr0622/CxKitty/main.py:129 in <module>                                                    │
│                                                                                                  │
│   126 │   │   classes = api.fetch_classes()  # 拉取该账号下所学的课程                            │
│   127 │   │   course_seq = dialog.select_class(console, classes)  # 进行课程选择                 │
│   128 │   │   for chapter in course_seq:  # 迭代返回课程章节                                     │
│ ❱ 129 │   │   │   fuck_task_worker(chapter)                                                      │
│   130 │   except Exception as err:                                                               │
│   131 │   │   console.print_exception(show_locals=False)                                         │
│   132 │   │   api.logger.error("-----*程序运行异常退出*-----", exc_info=True)                    │
│                                                                                                  │
│ /home/whr0622/CxKitty/main.py:68 in fuck_task_worker                                             │
│                                                                                                  │
│    65 │   │   │   │   continue                                                                   │
│    66 │   │   │   for task_point in chap.fetch_points_by_index(index):  # 获取当前章节的所有任   │
│    67 │   │   │   │   # 预拉取任务点数据                                                         │
│ ❱  68 │   │   │   │   prefetch_status = task_point.pre_fetch()                                   │
│    69 │   │   │   │   if not prefetch_status:                                                    │
│    70 │   │   │   │   │   del task_point                                                         │
│    71 │   │   │   │   │   continue                                                               │
│                                                                                                  │
│ /home/whr0622/CxKitty/cxapi/jobs/video.py:117 in pre_fetch                                       │
│                                                                                                  │
│   114 │   │   │   return False                                                                   │
│   115 │   │   except Exception:                                                                  │
│   116 │   │   │   self.logger.error("预拉取失败")                                                │
│ ❱ 117 │   │   │   raise RuntimeError("视频预拉取出错")                                           │
│   118 │                                                                                          │
│   119 │   def fetch(self) -> bool:                                                               │
│   120 │   │   "拉取视频"                                                                         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: 视频预拉取出错
程序运行出现错误, 请截图保存并附上 log 文件在 issue 提交
whr0622@debian:~/CxKitty$

image

from cxkitty.

SocialSisterYi avatar SocialSisterYi commented on July 28, 2024

问题很可能为接口风控导致,现在增加了打码支持

from cxkitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.