Skip to content

TypeError: Type is not msgpack serializable: Interrupt #31783

Answered by bedead
ivanzhu109 asked this question in Q&A
Discussion options

You must be logged in to vote

There are two reasons why this could be happening.

  1. interrupt requires the use of checkpointer. To quickly test it out u can import memorysaver from langgraph and set it.
graph = graph_builder.compile(checkpointer=MemorySaver())
  1. Another reason could be having issue in ur state definition. In langgraph states in lost cases should be of serializable type meaning, they can't be pre initialized objects/classes. In simple words they should only contain attributes with type such as str, int, bool, dict, etc. that helps langgraph seralize these attributes without additional config. But if any other types are used u need to create a custom seralization class of type serde which will be passed …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ivanzhu109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants