[BUG] update_communities broken
Bug Description
When activating update_communities there is an error ValueError: too many values to unpack (expected 2) in graphiti.py line 549 because update_community is returning a tuple but semaphore_gather then returns a list of tuples, not a merge of them. They need to be merged manually afterwards.
This was introduced here: https://github.com/getzep/graphiti/commit/dcc9da3f6887b84830758d7e89974eb4f2af8f92
Steps to Reproduce
await graphiti.add_episode(
name=episode.name,
episode_body=episode.episode_body,
source_description=episode.source_description,
reference_time=episode.reference_time,
group_id=episode.group_id,
update_communities=True,
)
Environment
- Graphiti Version: 0.18.6
- Python Version: 3.11
- Database Backend: Neo4j 5.26.6
- LLM Provider & Model: Google gemini-2.5-flash
Installation Method
- [ ] pip install
- [x] uv add
- [ ] Development installation (git clone)
Error Messages/Traceback
File "/app/.venv/lib/python3.11/site-packages/graphiti_core/graphiti.py", line 571, in add_episode
raise e
File "/app/.venv/lib/python3.11/site-packages/graphiti_core/graphiti.py", line 549, in add_episode
communities, community_edges = await semaphore_gather(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
Possible Solution
update_community is returning a tuple but semaphore_gather then returns a list of tuples, not a merge of them. They need to be merged manually afterwards.
same problem!
Experiencing this too
+1
@matthiaslau Is this still an issue? Please confirm within 14 days or this issue will be closed.
@matthiaslau Is this still an issue? Please confirm within 14 days or this issue will be closed.