Rain-shadow / cdr

微信词达人,高正确率,高效简洁。支持班级任务及自选任务
GNU Affero General Public License v3.0
125 stars 39 forks source link

二次选择任务,任务信息无法正常获取 #17

Open Rain-shadow opened 2 years ago

Rain-shadow commented 2 years ago

另外在刷完一个任务之后选择下一个任务的时候会报以下错误,但是重启软件之后还是能继续刷的,下面是错误日志

[Info] 开始做【B2 Unit1 Reading1】,目标分数:100 [Info] 题库装载完毕! [Info] 模拟加载流程 [Info] {"code":0,"msg":"对不起,创建任务信息失败,请返回首页重新加载","data":null} {'task_id': -1, 'course_id': 'JJ_2', 'list_id': 'JJ_2_1_1', 'timestamp': 1647499298225, 'versions': '1.2.0'} [Info] {"code":0,"msg":"对不起,创建任务信息失败,请返回首页重新加载","data":null}

[Error] Traceback (most recent call last): File "main.py", line 31, in File "cdr\core.py", line 65, in do_homework File "asyncio\base_events.py", line 641, in run_until_complete File "cdr\test\myself_task.py", line 67, in run File "cdr\test\cdr_task.py", line 48, in start_task File "cdr\aio\tasks.py", line 31, in run File "cdr\aio\tasks.py", line 49, in work File "cdr\aio\tasks.py", line 37, in work File "cdr\test\myself_task.py", line 109, in do_task TypeError: 'NoneType' object is not subscriptable

[Error] 'NoneType' object is not subscriptable [Error] 未知异常,请上报此错误(error-last.txt)给GM [Error] 你可以在“main\log\”下找到error-last.txt

Originally posted by @lisheng15 in https://github.com/Rain-shadow/cdr/issues/15#issuecomment-1070377850

Rain-shadow commented 2 years ago

复现步骤:先选择一个已获取任务信息(由task_id是否为-1判断)和一个未获取任务信息的2个任务同时做,完成后重新进入自选任务,此时选择新的未获取任务信息的任务会无法正常获取任务信息。 在词达人中按此流程可正常获取,暂未发现差异的原因

考虑到一般可以一次性选择多个任务完成,很少有人会二次选择任务,而且该bug并不影响正常流程,故该bug不是必须&紧急的。

因暂未发现原因,该bug长期搁置