{"record":{"id":"6da0e92c46176414","repo":"langchain-ai/langgraph","slug":"text-fields-must-be-a-list-or-a-string-got-text","errorCode":null,"errorMessage":"Text fields must be a list or a string. Got {text_fields}","messagePattern":"Text fields must be a list or a string\\. Got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint-sqlite/langgraph/store/sqlite/base.py","lineNumber":1497,"sourceCode":"        \"\"\"\n        raise NotImplementedError(_AIO_ERROR_MSG)\n\n\n# Helper functions\n\n\ndef _ensure_index_config(\n    index_config: SqliteIndexConfig,\n) -> tuple[Any, SqliteIndexConfig]:\n    \"\"\"Process and validate index configuration.\"\"\"\n    index_config = index_config.copy()\n    tokenized: list[tuple[str, Literal[\"$\"] | list[str]]] = []\n    tot = 0\n    text_fields = index_config.get(\"text_fields\") or [\"$\"]\n    if isinstance(text_fields, str):\n        text_fields = [text_fields]\n    if not isinstance(text_fields, list):\n        raise ValueError(f\"Text fields must be a list or a string. Got {text_fields}\")\n    for p in text_fields:\n        if p == \"$\":\n            tokenized.append((p, \"$\"))\n            tot += 1\n        else:\n            toks = tokenize_path(p)\n            tokenized.append((p, toks))\n            tot += len(toks)\n    index_config[\"__tokenized_fields\"] = tokenized\n    index_config[\"__estimated_num_vectors\"] = tot\n    embeddings = ensure_embeddings(\n        index_config.get(\"embed\"),\n    )\n    return embeddings, index_config\n\n\n_PLACEHOLDER = object()\n","sourceCodeStart":1479,"sourceCodeEnd":1515,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint-sqlite/langgraph/store/sqlite/base.py#L1479-L1515","documentation":"Error \"Text fields must be a list or a string. Got {text_fields}\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/checkpoint-sqlite/langgraph/store/sqlite/base.py:1497 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}