[Question]: ValueError: not enough values to unpack (expected 2, got 1)
Self Checks
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (Language Policy).
- [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
- [x] Please do not modify this template :) and fill in all the required fields.
Describe your problem
instruct-q8_0.gguf@LM-Studio", "update_time": 1743652119110, "task_type": ""}
Traceback (most recent call last):
File "/ragflow/rag/svr/task_executor.py", line 602, in handle_task
await do_handle_task(task)
File "/ragflow/rag/svr/task_executor.py", line 535, in do_handle_task
chunks = await build_chunks(task, progress_callback)
File "/ragflow/rag/svr/task_executor.py", line 244, in build_chunks
cks = await trio.to_thread.run_sync(lambda: chunker.chunk(task["name"], binary=binary, from_page=task["from_page"],
File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 447, in to_thread_run_sync
return msg_from_thread.unwrap()
File "/ragflow/.venv/lib/python3.10/site-packages/outcome/_impl.py", line 213, in unwrap
raise captured_error
File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 373, in do_release_then_return_result
return result.unwrap()
File "/ragflow/.venv/lib/python3.10/site-packages/outcome/_impl.py", line 213, in unwrap
raise captured_error
File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 392, in worker_fn
ret = context.run(sync_fn, *args)
File "/ragflow/rag/svr/task_executor.py", line 244, in
The error "ValueError: not enough values to unpack (expected 2, got 1)" in the tokenize_table function suggests that the tbls variable does not have the expected structure. The tokenize_table function expects tbls to be a list of tuples, where each tuple contains two elements: a tuple (img, rows) and poss [1].
To resolve this issue, ensure that the tbls variable is correctly structured before it is passed to tokenize_table. Each element in tbls should be a tuple with two parts:
- A tuple
(img, rows), whereimgis an image (orNone), androwsis a list of strings. -
poss, which is a list of positions associated with the table.
Check the code that constructs tbls to ensure it matches this expected format. If tbls is being constructed in the chunk method, verify that it is correctly formatted as [((None, lns), None) for lns in tbls] or similar, ensuring each element is a tuple with the expected structure [2].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Could you share the file? [email protected]