GraphRAG icon indicating copy to clipboard operation
GraphRAG copied to clipboard

lightrag运行错误

Open ysq111333 opened this issue 9 months ago • 6 comments

Image 这是我的报错。

Image这是我的config 请问我是哪里出了问题 谢谢您

ysq111333 avatar Apr 07 '25 03:04 ysq111333

faiss-gpu==1.9.0.post1 您好 您的版本是这个吗 我显示不兼容

ysq111333 avatar Apr 07 '25 13:04 ysq111333

this is my bug:2025-04-07 23:40:34.429 | WARNING | Core.Common.CostManager:update_cost:49 - Model Qwen/Qwen2.5-7B-Instruct not found in TOKEN_COSTS. 传递参数内容1: {'seed': 'Cryptocurrency industry, Criminal trial, Fraud, Conspiracy charges, Personal gain'} 传递参数内容2: {'seed': 'Cryptocurrency industry, Criminal trial, Fraud, Conspiracy charges, Personal gain'} 2025-04-07 23:40:34.647 | ERROR | Core.Query.BasicQuery:_retrieve_relevant_contexts_global_keywords:175 - edge_datas is None. Checking relations_vdb... 2025-04-07 23:40:34.648 | ERROR | Core.Query.BasicQuery:_retrieve_relevant_contexts_global_keywords:180 - relations_vdb not found in retriever Traceback (most recent call last): File "/home/yanshiqi/GraphRAG-master2/main.py", line 90, in save_path = wrapper_query(query_dataset, digimon, result_dir) File "/home/yanshiqi/GraphRAG-master2/main.py", line 47, in wrapper_query res = asyncio.run(digimon.query(query["question"])) File "/home/yanshiqi/miniconda3/envs/graphrag/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/yanshiqi/miniconda3/envs/graphrag/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/yanshiqi/GraphRAG-master2/Core/GraphRAG.py", line 290, in query response = await self._querier.query(query) File "/home/yanshiqi/GraphRAG-master2/Core/Query/BaseQuery.py", line 22, in query context = await self._retrieve_relevant_contexts(query=query) File "/home/yanshiqi/GraphRAG-master2/Core/Query/BasicQuery.py", line 23, in _retrieve_relevant_contexts entities_context, relations_context, text_units_context = await self._retrieve_relevant_contexts_global_keywords( File "/home/yanshiqi/GraphRAG-master2/Core/Query/BasicQuery.py", line 181, in _retrieve_relevant_contexts_global_keywords raise ValueError("edge_datas cannot be None at retrieval start") ValueError: edge_datas cannot be None at retrieval start

---------------------------------------------------------------------------------------------------------------------------------------------------调试发现这个图里的edge_datas = None , 请问您有办法解决吗万分感谢

Image

ysq111333 avatar Apr 07 '25 15:04 ysq111333

请给我看一下允许的指令和方法的config?

JayLZhou avatar Apr 08 '25 06:04 JayLZhou

Image 这是我的报错。

Image这是我的config 请问我是哪里出了问题 谢谢您

想问下这个问题解决了嘛?

JustinYHW avatar Aug 02 '25 08:08 JustinYHW

From the traceback, the key issue is:

TypeError: 'NoneType' object is not iterable

This happens inside EntityRetriever.py when it tries to loop over entities_by_relationships. That means the entity extraction step returned None instead of a valid list/dict.

Typical reasons for this:

  1. The retriever didn’t find any entities in the text (empty result, not handled properly).
  2. The config for the retriever is pointing to a wrong or uninitialized embedding / model API (so the entity extractor never returns structured data).
  3. If the API call fails silently, the pipeline still proceeds but passes None downstream.

So the real problem isn’t in the query itself, but in the retriever pipeline returning None where the code expects an iterable.

onestardao avatar Aug 18 '25 15:08 onestardao

Just delete the entity_vdb and relations_vdb in rkg_graph, then regenerate them. :D

HereW avatar Oct 09 '25 09:10 HereW