Errors¶ 错误¶
While you may not want to see them, informative errors help you design better workflows.
Below are the LangGraph-specific errors and what they mean.
虽然您可能不想看到它们,但信息性错误可以帮助您设计更好的工作流程。以下是特定于 LangGraph 的错误及其含义。
GraphRecursionError
¶
Bases: RecursionError
基数:RecursionError
Raised when the graph has exhausted the maximum number of steps.
当图形用尽最大步数时引发。
This prevents infinite loops. To increase the maximum number of steps,
run your graph with a config specifying a higher recursion_limit
.
这样可以防止无限循环。要增加最大步骤数,请使用指定更高recursion_limit
的配置运行图表。
Examples: 例子:
graph = builder.compile()
graph.invoke(
{"messages": [("user", "Hello, world!")]},
# The config is the second positional argument
{"recursion_limit": 1000},
)
Source code in libs/langgraph/langgraph/errors.py
libs/langgraph/langgraph/errors.py
中的源代码
EmptyChannelError
¶
Raised when attempting to get the value of a channel that hasn't been updated
for the first time yet.
在尝试获取尚未首次更新的频道的值时引发。
InvalidUpdateError
¶
Raised when attempting to update a channel with an invalid sequence of updates.
在尝试使用无效的更新序列更新频道时引发。