kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

[BUG] LightGraphRAG Error: GraphRAG index not found for file_id

Open Stockard opened this issue 9 months ago • 0 comments

Description

When I uploaded an csv file to LightRAG, then click search in file, the returning error message says "GraphRAG index not found for file_id" I am quite confused because I am using lightrag and have the right hku package installed. also I have graphRAG installed too.

Reproduction steps

1. install LightRAG-pku
2. upload an csv file to LightRAG panel
3. click search in file
4. search for random words

Screenshots


Logs

searching in doc_ids []
INFO:ktem.index.file.pipelines:Skip retrieval because of no selected files: DocumentRetrievalPipeline(
  (vector_retrieval): <function Function._prepare_child.<locals>.exec at 0x758b6c2dfc70>
  (embedding): <function Function._prepare_child.<locals>.exec at 0x758b6c2df0a0>
)
Traceback (most recent call last):
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/queueing.py", line 575, in process_events
    response = await route_utils.call_process_api(
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
    output = await app.get_blocks().process_api(
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 663, in async_iteration
    return await iterator.__anext__()
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 656, in __anext__
    return await anyio.to_thread.run_sync(
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 639, in run_sync_iterator_async
    return next(iterator)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/gradio/utils.py", line 801, in gen_wrapper
    response = next(iterator)
  File "/data/username/kotaemon/libs/ktem/ktem/pages/chat/__init__.py", line 1321, in chat_fn
    for response in pipeline.stream(chat_input, conversation_id, chat_history):
  File "/data/username/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 291, in stream
    docs, infos = self.retrieve(message, history)
  File "/data/username/kotaemon/libs/ktem/ktem/reasoning/simple.py", line 132, in retrieve
    retriever_docs = retriever_node(text=query)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1097, in __call__
    raise e from None
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1088, in __call__
    output = self.fl.exec(func, args, kwargs)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/backends/base.py", line 151, in exec
    return run(*args, **kwargs)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 144, in __call__
    raise e from None
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 141, in __call__
    _output = self.next_call(*args, **kwargs)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/middleware.py", line 117, in __call__
    return self.next_call(*args, **kwargs)
  File "/data/username/conda/kotaemon/lib/python3.10/site-packages/theflow/base.py", line 1017, in _runx
    return self.run(*args, **kwargs)
  File "/data/username/kotaemon/libs/ktem/ktem/index/file/graph/lightrag_pipelines.py", line 491, in run
    graphrag_func, query_params = self._build_graph_search()
  File "/data/username/kotaemon/libs/ktem/ktem/index/file/graph/lightrag_pipelines.py", line 425, in _build_graph_search
    assert graph_id, f"GraphRAG index not found for file_id: {file_id}"
AssertionError: GraphRAG index not found for file_id: 0fb12d6f-9e50-4b8e-b062-f44b8f24a213

Browsers

Chrome

OS

Linux

Additional information

No response

Stockard avatar Mar 25 '25 08:03 Stockard