Error in module 4 - sub_graphs.py when running LangGraph Studio

I’m trying to run LangGraph Studio in module 4 and I get this error in the sub_graphs.py file:

TypeError: StateGraph.__init__() missing 1 required positional argument: 'state_schema'

Looks like the fix is in line 70. When I edit that line to:

qs_builder = StateGraph(QuestionSummarizationState)

LangGraph Studio runs fine. Looks like in new versions of LangGraph StateGraph doesn’t accept input or output parameters?

LangGraph Studio runs fine. Looks like in new versions of LangGraph StateGraph doesn’t accept input or output parameters?

v0.5 and up accepts input_schema and output_schema instead! Also, state_schema is indeed required.

2 Likes

Ok thanks!

Hey @atc, we’ve updated the academy repo with the new input_schema and output_schema!

1 Like

Great thanks. From having worked on docs before, I know it’s hard to keep things up to date as new versions get released. Will let you know if I come across anything else as I finish up the lessons.

1 Like