fix: correct [graphrag/general/exactor.py change.removed_nodes.extend(nodes[1:])] AttributeError: 'set' object has no attribute 'extend'

[AttributeError: 'set' object has no attribute 'nodes' TypeError: 'NoneType' object is not iterable] from commit ece5903
This commit is contained in:
lvyue
2025-03-31 23:44:28 +08:00
parent ece59034f7
commit e6665288d5
2 changed files with 4 additions and 4 deletions

View File

@ -111,7 +111,7 @@ class EntityResolution(Extractor):
connect_graph.add_edges_from(resolution_result)
async with trio.open_nursery() as nursery:
for sub_connect_graph in nx.connected_components(connect_graph):
merging_nodes = list(sub_connect_graph.nodes())
merging_nodes = list(sub_connect_graph)
nursery.start_soon(lambda: self._merge_graph_nodes(graph, merging_nodes, change))
# Update pagerank