Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
errors.cpython-313.pyc75 linesDownload Raw Back to __pycache__
1�

2��j�����SSKJr SSKJr SSKJr SSKJr SSKJ	r	J3r4 SSKJr SSK
Jr SSKJr SS	KJrJr SS5KJr Sr"SS
\5rS*Sjr"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r\"SSS9"SS\55r "SS\5r!"S S!\5r""S"S#\5r#\"S$S$S%9"S&S'55r$"S(S)\5r%g)+�)�annotations)�Sequence)�	dataclass)�Enum)�Any�Literal)�warn)�EmptyChannelError)�6deprecated)�Command�	Interrupt)�LangGraphDeprecatedSinceV10)
r7�	ErrorCode�GraphDrained�GraphRecursionError�InvalidUpdateError�
GraphBubbleUp�GraphInterrupt�	NodeError�
NodeInterrupt�NodeTimeoutError�
ParentCommand�EmptyInputError�TaskNotFoundc�(�\rSrSrSrSrSrSrSrSr	g)	r�!�GRAPH_RECURSION_LIMIT�INVALID_CONCURRENT_GRAPH_UPDATE�INVALID_GRAPH_NODE_RETURN_VALUE�MULTIPLE_SUBGRAPHS�INVALID_CHAT_HISTORY�N)8�__name__�9__module__�__qualname__�__firstlineno__rrrr r!�__static_attributes__r"��VD:\code\apps\devtools\python\user_packages\Python313\site-packages\langgraph/errors.pyrr!s ��3��&G�#�&G�#�-��1�r(rc�$�USUR3$)NzT10For troubleshooting, visit: https://docs.langchain.com/oss/python/langgraph/errors/��value)�message�11error_codes  r)�create_error_messager/)s"���)���"�"�#�	%�r(c��\rSrSrSrg)r�1r"N)r#r$r%r&r'r"r(r)rr1s��r(rc�4^�\rSrSrSrSSU4SjjjrSrU=r$)r�5aRaised when a graph run exits early due to a drain request.12 13This indicates the graph stopped cooperatively at a superstep boundary14because `RunControl.request_drain()` was called (e.g., in response to15SIGTERM). The checkpoint is saved and the run can be resumed later.16c�6>�Xl[TU]	SU35 g)NzGraph drained: )�reason�super�__init__)�selfr5�	__class__s  �r)r7�GraphDrained.__init__=s�����
���?�6�(�3�4r()r5)�shutdown)r5�str�return�None�r#r$r%r&�__doc__r7r'�
__classcell__�r9s@r)rr5s����5�5r(rc��\rSrSrSrSrg)r�BaRaised when the graph has exhausted the maximum number of steps.17 18This prevents infinite loops. To increase the maximum number of steps,19run your graph with a config specifying a higher `recursion_limit`.20 21Troubleshooting guides:22 23- [`GRAPH_RECURSION_LIMIT`](https://docs.langchain.com/oss/python/langgraph/GRAPH_RECURSION_LIMIT)24 25Examples:26 27    graph = builder.compile()28    graph.invoke(29        {"messages": [("user", "Hello, world!")]},30        # The config is the second positional argument31        {"recursion_limit": 1000},32    )33r"N�r#r$r%r&r@r'r"r(r)rrBs���&	r(rc��\rSrSrSrSrg)r�YaSRaised when attempting to update a channel with an invalid set of updates.34 35Troubleshooting guides:36 37- [`INVALID_CONCURRENT_GRAPH_UPDATE`](https://docs.langchain.com/oss/python/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE)38- [`INVALID_GRAPH_NODE_RETURN_VALUE`](https://docs.langchain.com/oss/python/langgraph/INVALID_GRAPH_NODE_RETURN_VALUE)39r"NrEr"r(r)rrYs���	r(rc�4^�\rSrSrSrSSU4SjjjrSrU=r$)r�eztRaised when a subgraph is interrupted, suppressed by the root graph.40Never raised directly, or surfaced to the user.r"c�$>�[TU]U5 g�N�r6r7)r8�41interruptsr9s  �r)r7�GraphInterrupt.__init__is���
����$r()r")rMzSequence[Interrupt]r=r>r?rBs@r)rres���7�%�%r(rzYNodeInterrupt is deprecated. Please use [`interrupt`][langgraph.types.interrupt] instead.N)�categoryc�4^�\rSrSrSrSSU4SjjjrSrU=r$)r�mz(Raised by a node to interrupt execution.c�>�[S[SS9 Uc[TU]
[	US9/5 g[TU]
[	XS9/5 g)NzLNodeInterrupt is deprecated. Please use `langgraph.types.interrupt` instead.�)�42stacklevelr+)r,�id)r	rr6r7r
)r8r,rUr9s   �r)r7�NodeInterrupt.__init__tsE����Z�'��	43�44�:��G��i�e�4�5�6��G��i�e�;�<�=r(r"rK)r,rrUz45str | Noner=r>r?rBs@r)rrms���463�	>�	>r(rc�8^�\rSrSr%S\S'SU4SjjrSrU=r$)r�ztuple[Command]�argsc�$>�[TU]U5 grKrL)r8�commandr9s  �r)r7�ParentCommand.__init__�s���
����!r(r")r[rr=r>)r#r$r%r&�__annotations__r7r'rArBs@r)rr�s���47��"�"r(rc��\rSrSrSrSrg)r�z*Raised when graph receives an empty input.r"NrEr"r(r)rr�s��4�r(rc��\rSrSrSrSrg)r�zIRaised when the executor is unable to find a task (for distributed mode).r"NrEr"r(r)rr�s��S�r(rT)�frozen�slotsc�0�\rSrSr%SrS\S'S\S'Srg)	r�aMFailure context passed to a node-level error handler.48 49Inject by adding a parameter typed `NodeError` to a handler registered via50`StateGraph.add_node(..., error_handler=...)`:51 52```python53def handler(state: State, error: NodeError) -> Command:54    return Command(update={"status": f"recovered from {error.node}: {error.error}"})55```56r<�node�
BaseException�errorr"N)r#r$r%r&r@r]r'r"r(r)rr�s��	��I�2���.r(rc�^�\rSrSr%SrS\S'S\S'S\S'S\S	'S\S57'S\S'S
S
S.SU4SjjjrSrU=r$)r�a�Raised when a node invocation exceeds one of its configured timeouts.58 59Does **not** inherit from the built-in `TimeoutError` (a subclass of60`OSError`) so that the default `RetryPolicy` treats it as retryable.61 62Both `idle_timeout` and `run_timeout` reflect the configured policy at the63time of the failure (each is `None` if not configured). `kind` and64`timeout` identify which one fired.65r<rf�float�timeout�float | None�run_timeout�idle_timeout�elapsed�Literal['idle', 'run']�kindN)rornc�>�US:Xa#Uc[S5eSUSUSSUSS3nX@lO4US:Xa#Uc[S	5eSUS66USSUSS3nXPlO[S5e[TU]
U5 XlX lX0lX@lXPlg)
N�idlez)idle_timeout is required when kind='idle'zNode 'z' exceeded its idle timeout of z.3fz$s without making progress (elapsed: zs).�runz'run_timeout is required when kind='run'z' exceeded its run timeout of zs (elapsed: zkind must be 'idle' or 'run')	�67ValueErrorrlr6r7rfrprrrorn)r8rfrprrrornr-r9s       �r)r7�NodeTimeoutError.__init__�s�����6�>��#� �!L�M�M����=���$�%�$�S�M��.�
�68(�L�
�U�]��"� �!J�K�K����<��s�#�<���}�C�A�
�'�L��;�<�<�
����!��	����	�(��&�r()rprorrrfrnrl)rfr<rprkrrrqrormrnrmr=r>)	r#r$r%r&r@r]r7r'rArBs@r)rr�sw�����I�
�N�����
�N�69 � �&*�$(�!'��!'��!'�70%�!'�#�
!'�"�!'�71�!'�!'r(r)r-r<r.rr=r<)&�72__future__r�collections.abcr�dataclassesr�enumr�typingrr�warningsr	�langgraph.checkpoint.baser73�typing_extensionsr�langgraph.typesrr
�langgraph.warningsr�__all__rr/�	Exceptionrr�RecursionErrorrrrrrrrrrr"r(r)�<module>r�s���"�$�!����8�(�.�:���"2��2��	�I�	�745�=�755�	�.�	�.		��		�%�]�%��_�
��>�N�>�	�>�"�M�"�	�i�	�	�9�	��$�d�#�/�/�$�/�&3'�y�3'r(
codekingpro/portable-devtools · Team Ai