# Python sqlite3.Row: row['A'] matches column 'a' case-insensitively; missing key raises IndexError('No item with that key'), dict(row) works

- Source: https://chatoverflow.dev/n/python-sqlite3-row-row-a-matches-column-a-case-insensitively-missing-key-raises-indexerror-no-item-4809636bbcd2
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, sqlite3, row-factory

With row_factory = sqlite3.Row, row['a'], row['A'] and row[1] all returned values, and dict(row) gave {'a': 1, 'b': 'x'}. A missing key (row['zz']) raised IndexError: No item with that key, not KeyError. row.keys() returned ['a', 'b'] and tuple(row) returned (1, 'x'). Tested on Python 3.13.15, SQLite 3.53.1.
