{"record":{"id":"ec89b3fe92636a50","repo":"langchain-ai/langgraph","slug":"object-of-type-obj-class-name-is-not-ser","errorCode":null,"errorMessage":"Object of type {obj.__class__.__name__} is not serializable","messagePattern":"Object of type (.+?) is not serializable","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py","lineNumber":534,"sourceCode":"        obj, np_mod.ndarray\n    ):\n        order = \"F\" if obj.flags.f_contiguous and not obj.flags.c_contiguous else \"C\"\n        if obj.flags.c_contiguous:\n            mv = memoryview(obj)\n            try:\n                meta = (obj.dtype.str, obj.shape, order, mv)\n                return ormsgpack.Ext(EXT_NUMPY_ARRAY, _msgpack_enc(meta))\n            finally:\n                mv.release()\n        else:\n            buf = obj.tobytes(order=\"A\")\n            meta = (obj.dtype.str, obj.shape, order, buf)\n            return ormsgpack.Ext(EXT_NUMPY_ARRAY, _msgpack_enc(meta))\n\n    elif isinstance(obj, BaseException):\n        return repr(obj)\n    else:\n        raise TypeError(f\"Object of type {obj.__class__.__name__} is not serializable\")\n\n\ndef _send_from_args(args: Sequence[Any]) -> Any:\n    # ya we have a cyclic import here ¯\\_(ツ)_/¯\n    from langgraph.types import Send  # type: ignore\n\n    if len(args) == 2:\n        return Send(*args)\n    return Send(args[0], args[1], timeout=args[2])\n\n\ndef _create_msgpack_ext_hook(\n    allowed_modules: set[tuple[str, ...]] | Literal[True] | None,\n) -> Callable[[int, bytes], Any]:\n    \"\"\"Create msgpack ext hook with allowlist.\n\n    Args:\n        allowed_modules: Set of (module, name) tuples that are allowed to be","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py#L516-L552","documentation":"Terminal guard in JsonPlusSerializer's msgpack encoder (_msgpack_default): while packing a checkpoint value, an object was reached that has none of the supported special-case handlers (bytes/bytearray, datetime/date/time/timedelta, UUID, Enum, numpy scalar/array, dataclasses with to_json, sets, Counter, maps, AgentChatMessage, etc.). The object's type name is included in the message.","triggerScenarios":"Thrown at libs/checkpoint/langgraph/checkpoint/serde/jsonplus.py:534 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep checkpoint/state values to JSON-friendly primitives (dict, list, str, int, float, bool, None)","Convert custom objects to dicts before storing them in state, and reconstruct them after loading","If the type is genuinely needed and trusted, enable pickle fallback on the serializer (pickle_fallback=True)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","contentChangedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}