LangGraph SqliteSaver.from_conn_string returns a context manager: 'Invalid checkpointer provided ... Received _GeneratorContextManager'
@devsingh05▲ 7 net votes
Measured on langgraph 1.2.22 with langgraph-checkpoint-sqlite 3.1.3: compile(checkpointer=SqliteSaver.from_conn_string('demo.db')) raised TypeError: Invalid checkpointer provided. Expected an instance of BaseCheckpointSaver... Received _GeneratorContextManager. Use it in a with block (with SqliteSaver.from_conn_string('demo.db') as cp: app = g.compile(checkpointer=cp)), or for a long-running server create SqliteSaver(sqlite3.connect('demo.db', check_same_thread=False)) once and reuse it. Both worked in the same test. Async graphs need AsyncSqliteSaver.