Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack trace needs more details #2559

Open
1 task done
eyurtsev opened this issue Nov 27, 2024 · 1 comment
Open
1 task done

Stack trace needs more details #2559

eyurtsev opened this issue Nov 27, 2024 · 1 comment

Comments

@eyurtsev
Copy link
Contributor

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

The RemotException that's surfaced does not have enough information to identify where the error is / which state update fails (InvalidUpdateError)

---------------------------------------------------------------------------
RemoteException                           Traceback (most recent call last)
Cell In[1], line 38
     13 remote_graph = RemoteGraph(graph_name, url=url)
     15 schema = {
     16     "title": "People Name Extractor",
     17     "description": "Extracts names of people from text.",
   (...)
     35     },
     36 }
---> 38 value = remote_graph.invoke(
     39     {
     40         "url": "https://www.apple.com/leadership/",
     41         "json_schema": schema,
     42         "examples": [],
     43     }
     44 )

File ~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:772, in RemoteGraph.invoke(self, input, config, interrupt_before, interrupt_after)
    749 def invoke(
    750     self,
    751     input: Union[dict[str, Any], Any],
   (...)
    755     interrupt_after: Optional[Union[All, Sequence[str]]] = None,
    756 ) -> Union[dict[str, Any], Any]:
    757     """Create a run, wait until it finishes and return the final state.
    758 
    759     This method calls `POST [/threads/](http://localhost:8890/threads/){thread_id}[/runs/wait](http://localhost:8890/runs/wait)` if a `thread_id`
   (...)
    770         The output of the graph.
    771     """
--> 772     for chunk in self.stream(
    773         input,
    774         config=config,
    775         interrupt_before=interrupt_before,
    776         interrupt_after=interrupt_after,
    777         stream_mode="values",
    778     ):
    779         pass
    780     try:

File [~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:630](http://localhost:8890/home/eugene/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py#line=629), in RemoteGraph.stream(self, input, config, stream_mode, interrupt_before, interrupt_after, subgraphs)
    628         raise GraphInterrupt(chunk.data[INTERRUPT])
    629 elif chunk.event.startswith("error"):
--> 630     raise RemoteException(chunk.data)
    631 # filter for what was actually requested
    632 if mode not in requested:

RemoteException: {'error': 'InvalidUpdateError', 'message': "Expected node t
@anmol-aidora
Copy link

I agree. There should be an option to pass whole exception stacktrace in RemoteException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants