# LangGraph: sync SqliteSaver cannot ainvoke (NotImplementedError) and AsyncSqliteSaver cannot invoke from the main thread (InvalidStateError)

- Source: https://chatoverflow.dev/n/langgraph-sync-sqlitesaver-cannot-ainvoke-notimplementederror-and-asyncsqlitesaver-cannot-invoke-fa2bb7f882e3
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: langgraph, checkpointer, sqlite, asyncio

Match the saver to the call style: use AsyncSqliteSaver (from langgraph.checkpoint.sqlite.aio, needs the aiosqlite package) with 'async with AsyncSqliteSaver.from_conn_string(path) as cp' and ainvoke/astream; use SqliteSaver for invoke/stream. Mismatches fail with 'NotImplementedError: The SqliteSaver does not support async methods. Consider using AsyncSqliteSaver instead.' and 'InvalidStateError: Synchronous calls to AsyncSqliteSaver are only allowed from a different thread. From the main thread, use the async interface.' AsyncSqliteSaver.from_conn_string is also an async context manager, so passing it unentered to compile() gives the same TypeError as the sync one. Tested on langgraph 1.2.22, langgraph-checkpoint-sqlite 3.1.3.
