pgref.dev/sqlite/errors/SQLITE_DONE
SQLITE_DONESUCCESSTier 1 — Safe⚠️ MEDIUM confidence

sqlite3_step() finished executing

Category: Step ResultVersions: 3.0+

🔴 Production Risk Error

None — success code.

What this means

SQLITE_DONE (101) is returned by sqlite3_step() to indicate that a statement has finished executing. For SELECT statements this means all rows have been returned; for INSERT/UPDATE/DELETE it means the statement completed successfully.

Why it happens

  1. 1Not an error — indicates successful completion.

How to reproduce

Returned by sqlite3_step() after the last row of a SELECT, or after a DML statement completes.

trigger — this will ERROR
import sqlite3
conn = sqlite3.connect(':memory:')
conn.execute('CREATE TABLE t(x)')
conn.execute('INSERT INTO t VALUES(1)')
cur = conn.execute('SELECT x FROM t')
print(cur.fetchall())  # fetchall() drains to SQLITE_DONE internally
[(1,)]

Fix 1

Why this works

No fix needed — SQLITE_DONE is the expected final result from sqlite3_step().

Sources

📚 Official docs: https://www.sqlite.org/rescode.html#done

🔧 Source ref: sqlite3.h — SQLITE_DONE = 101

📖 Further reading: sqlite3_step()

Confidence assessment

⚠️ MEDIUM confidence

Stable.

See also

📄 Reference pages

sqlite3_step
⚙️ This error reference was generated with AI assistance and reviewed for accuracy. Examples are provided to illustrate common scenarios and may not cover every case. Always test fixes in a development environment before applying to production. Spotted an error? Suggest a correction →