Comments (4)
可以选择删掉cxapi/jobs/video.py的89行直接跳过预拉取失败,这个办法并不能解决拉取出错的问题,但是可以直接跳过预拉取出错的视频,属于是一个关闭保险丝的操作了,但是经过实测,预拉取失败并不影响之后的正常拉去视频
from cxkitty.
from cxkitty.
在闯关模式下,上一个题目在题库中未搜索到答案,自动进入下一课程章节时,会出现视频预拉取出错。
请输入欲完成的课程 (序号/名称/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$
from cxkitty.
问题很可能为接口风控导致,现在增加了打码支持
from cxkitty.
Related Issues (20)
- searcher 48行运行报错 HOT 1
- 怎么对接其他的题库呀,如果有别的题库token的话 HOT 5
- Crypto这个模块用的是哪个版本的呀,发现一直没有这个一直无法运行 HOT 1
- KeyError: 'description' HOT 1
- 题库录入功能 HOT 4
- 怎么搞个api对接呀 HOT 2
- 请问如何实现一次选多个科目或一个科目结束后返回选另一个科目而不是直接退出 HOT 1
- 怎么让没有匹配到答案的题随机选一个答案提交
- RuntimeError: 视频预拉取出错 HOT 7
- 上报时出错 HOT 2
- RuntimeError: 视频预拉取出错 HOT 1
- 出现以下报错:RuntimeError: 视频预拉取出错 以下是log日志文件 HOT 3
- 获取课程信息失败,没有core字段了
- AttributeError:“NoneType”对象没有属性“text” ,用API在线题库,显示jsonpath没有compile方法 HOT 4
- 安装时出错 HOT 1
- 账号密码登录没有反应 HOT 1
- 刷课途中闪退 HOT 1
- AttributeError: 'NoneType' object has no attribute 'text' HOT 2
- 可以添加一个匹配不到题目随机选择并提交 HOT 1
- 为啥安装上lxml之后也老是报错,我用poetry命令安装4.9.1安装不上,转而又安装4.9.2就报错 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cxkitty.