python lightrag_ollama_demo.py 'NoneType' object is not subscriptable
INFO:lightrag:Inserting relationships into storage...
Inserting relationships: 0relationship [00:00, ?relationship/s]
WARNING:lightrag:Didn't extract any entities, maybe your LLM is not working
WARNING:lightrag:No new entities and relationships found
INFO:lightrag:Writing graph with 0 nodes, 0 edges
INFO:httpx:HTTP Request: POST http://localhost:11434/api/embeddings "HTTP/1.1 200 OK"
Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\1.py", line 35, in <module>
rag.query("N150处理器主机的价格?", param=QueryParam(mode="naive"))
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\lightrag\lightrag.py", line 427, in query
return loop.run_until_complete(self.aquery(query, param))
File "C:\ProgramData\miniconda3\envs\rag\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\lightrag\lightrag.py", line 441, in aquery
response = await naive_query(
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\lightrag\operate.py", line 1000, in naive_query
maybe_trun_chunks = truncate_list_by_token_size(
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\lightrag\utils.py", line 191, in truncate_list_by_token_size
tokens += len(encode_string_by_tiktoken(key(data)))
File "C:\Users\Administrator\Downloads\LightRAG-main2\LightRAG-main\lightrag\operate.py", line 1002, in <lambda>
key=lambda x: x["content"],
TypeError: 'NoneType' object is not subscriptable
I get this error when trying to run default (global) search on a graph that was constructed only via insert_custom_kg. When I switch to local search, it works fine.
python lightrag_ollama_demo.py 'NoneType' object is not subscriptable