Open jhualee opened 3 months ago
main
c0d71adaa2c6c8d5b54d2ec5e4fe51ad0ea07c01
No response
因为tasks = TaskService.get_tasks(msg["id"])返回空数组,导致assert tasks, "{} empty task!".format(msg["id"])抛出异常,程序终止
tasks = TaskService.get_tasks(msg["id"])
assert tasks, "{} empty task!".format(msg["id"])
对抛出的断言异常进行捕获处理
1、启动ragflow_server、task_executor、前端项目 2、在系统页面知识库->数据集中新增一个待解析文件,并点击执行按钮 3、在task_executor下的控制台中,提示报错
/root/miniconda3/bin/conda run -n ragflow --no-capture-output python /mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py [WARNING] Load term.freq FAIL! [WARNING] [2024-05-24 17:25:31,492] [synonym.init] [line:24]: Realtime synonym is disabled, since no redis connection. Traceback (most recent call last): File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 375, in main() File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 294, in main rows = collect() ^^^^^^^^^ File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 117, in collect assert tasks, "{} empty task!".format(msg["id"]) AssertionError: 7fce51b819 ac11ef964e00155d0024f8 empty task! ERROR conda.cli.main_run:execute(124): conda run python /mnt/e/work/shan ghai_workspace/ai/ragflow/rag/svr/task_executor.py failed. (See above for error)
conda run python /mnt/e/work/shan ghai_workspace/ai/ragflow/rag/svr/task_executor.py
This is caused by dirty data after restarting the system. Ignore that and the task_executor will restart itself. And cancel the task after restarting the server.
Is there an existing issue for the same bug?
Branch name
main
Commit ID
c0d71adaa2c6c8d5b54d2ec5e4fe51ad0ea07c01
Other environment information
No response
Actual behavior
因为![微信截图_20240524172611](https://github.com/infiniflow/ragflow/assets/22141921/1550df5e-755c-43b5-a2cd-128af9e01f86)
tasks = TaskService.get_tasks(msg["id"])
返回空数组,导致assert tasks, "{} empty task!".format(msg["id"])
抛出异常,程序终止Expected behavior
对抛出的断言异常进行捕获处理
Steps to reproduce
Additional information
/root/miniconda3/bin/conda run -n ragflow --no-capture-output python /mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py [WARNING] Load term.freq FAIL! [WARNING] [2024-05-24 17:25:31,492] [synonym.init] [line:24]: Realtime synonym is disabled, since no redis connection. Traceback (most recent call last): File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 375, in
main()
File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 294, in main
rows = collect()
^^^^^^^^^
File "/mnt/e/work/shanghai_workspace/ai/ragflow/rag/svr/task_executor.py", line 117, in collect
assert tasks, "{} empty task!".format(msg["id"])
AssertionError: 7fce51b819
ac11ef964e00155d0024f8 empty task!
ERROR conda.cli.main_run:execute(124):
conda run python /mnt/e/work/shan ghai_workspace/ai/ragflow/rag/svr/task_executor.py
failed. (See above for error)