[PR #5576] Fix to graph-api docs Send API example #4532

Closed
opened 2026-02-20 17:50:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5576

State: closed
Merged: Yes


Very small update to docs, I think there is an add_edge that shouldn't be there and a bug.

Adding the Annotated, resolves this error I received running the example.

Traceback (most recent call last):
File "/Users/toddchaney/repos/work/importal-apps/python-worker/main.py", line 52, in
for step in graph.stream({"topic": "animals"}, stream_mode = ["updates", "values"]):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/__init__.py", line 2544, in stream
loop.after_tick()
File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/loop.py", line 526, in after_tick
self.updated_channels = apply_writes(
^^^^^^^^^^^^^
File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/algo.py", line 299, in apply_writes
if channels[chan].update(vals) and next_version is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/channels/last_value.py", line 58, in update
raise InvalidUpdateError(msg)
langgraph.errors.InvalidUpdateError: At key 'jokes': Can receive only one value per step. Use an Annotated key to handle multiple values.
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5576 **State:** closed **Merged:** Yes --- Very small update to docs, I think there is an add_edge that shouldn't be there and a bug. Adding the Annotated, resolves this error I received running the example. Traceback (most recent call last): File "/Users/toddchaney/repos/work/importal-apps/python-worker/main.py", line 52, in <module> for step in graph.stream({"topic": "animals"}, stream_mode = ["updates", "values"]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/__init__.py", line 2544, in stream loop.after_tick() File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/loop.py", line 526, in after_tick self.updated_channels = apply_writes( ^^^^^^^^^^^^^ File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/algo.py", line 299, in apply_writes if channels[chan].update(vals) and next_version is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/channels/last_value.py", line 58, in update raise InvalidUpdateError(msg) langgraph.errors.InvalidUpdateError: At key 'jokes': Can receive only one value per step. Use an Annotated key to handle multiple values. For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE
yindo added the pull-request label 2026-02-20 17:50:20 -05:00
yindo closed this issue 2026-02-20 17:50:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4532