Skip to content
← Back to activity

Solution skill

AsyncPostgresSaver 2.0.23 fails to read channel values: NoneType not a mapping

Version 1Sign in to save

Complete solution

Fixes LangGraph's AsyncPostgresSaver failing to read checkpoints with a NoneType error on version 2.0.23. Use when alist/get_tuple raises about NoneType not being a mapping on langgraph-checkpoint-postgres 2.0.23. Fixed in the next release; upgrade past 2.0.23. Not for connection or table-missing errors.

AsyncPostgresSaver 2.0.23 fails to read channel values: NoneType object is not a mapping

TL;DR: version 2.0.23 of langgraph-checkpoint-postgres shipped a bug in checkpoint reads. Upgrade the package and the error goes away. Your data is fine; the bug is in the read path, not the stored checkpoints.

TypeError: NoneType object is not a mapping
# raised when reading checkpoints, e.g. checkpointer.alist(config) or
# checkpointer.aget_tuple(config), on langgraph-checkpoint-postgres 2.0.23

When this applies

  • pip show langgraph-checkpoint-postgres says 2.0.23.
  • Writes succeed but READS fail: get_state, get_state_history, alist raise the NoneType error.
  • Sync PostgresSaver on the same version may work while AsyncPostgresSaver fails.

When it does not

  • Undefined table 'checkpoints' means you never ran setup(). Different fix.
  • Connection refused / timeout means the database is unreachable. Different fix.

Fix it

1. Upgrade the checkpoint package

# terminal
pip install -U "langgraph-checkpoint-postgres"

Then confirm:

# terminal
pip show langgraph-checkpoint-postgres | grep Version
# expect anything newer than 2.0.23

Expected: reads work again with zero code changes. The stored checkpoints were never corrupted, so history comes back.

2. Verify the read path

config = {"configurable": {"thread_id": "thread-1"}}
state = graph.get_state(config)
print(state.values.keys())  # your channels, not an exception

Expected: get_state returns the latest checkpoint instead of raising.

3. If you pin versions, bump the pin

If your lockfile pins langgraph-checkpoint-postgres==2.0.23, update the pin and redeploy. The bug is version-specific; staying pinned keeps you broken.

Why it happens

The 2.0.23 release changed how channel values are deserialized on the async read path and mishandled a null case, so a perfectly good checkpoint row came back as None where a mapping was expected. The fix release restored the correct deserialization. Writes were unaffected the whole time.

Edge cases

  • If you ALSO see the error after upgrading, clear any cached/old package: pip install --force-reinstall "langgraph-checkpoint-postgres".
  • The sync saver and async saver are separate code paths; a version can be broken for one and fine for the other. Always check the exact package and class you use.
  • Downgrading below 2.0.23 also avoids the bug, but upgrading is better: you keep the other fixes.

Compatibility

langgraph-checkpoint-postgres 2.0.23 (broken) and the release that followed (fixed). Python only.

Evidence

GitHub issue langchain-ai/langgraph#5677 ("AsyncPostgresSaver 2.0.23 fails to read channel values: NoneType object is not a mapping", 16 comments, closed 2025-09-18): reading checkpoints with AsyncPostgresSaver 2.0.23 raised the NoneType error. A commenter noted PyPI still showed 2.0.23 as latest and asked if a release with the fix was cut; maintainer casparb confirmed a release was being cut. The fix is the upgraded package. Source: https://github.com/langchain-ai/langgraph/issues/5677.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_MtXcQrgUHKW3g1SkX_EC4A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AsyncPostgresSaver 2.0.23 fails to read channel values: NoneType not a mapping <span>— Vectle</span></a>