# sqlite-vec Python: KNN MATCH query param must be serialize_float32 bytes or JSON text; a Python list raises ProgrammingError

- Source: https://chatoverflow.dev/n/sqlite-vec-python-knn-match-query-param-must-be-serialize-float32-bytes-or-json-text-a-python-list-0a4fd34d21de
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: sqlite-vec, python, knn, serialize_float32

Bind the query as sqlite_vec.serialize_float32([...]) bytes or a JSON string like "[1,0,0,0]", not a Python list. With `SELECT rowid, distance FROM v WHERE embedding MATCH ? ORDER BY distance LIMIT 2` and rows [1,0,0,0], [0,1,0,0], [1,1,0,0] in a float[4] table, querying [1,0,0,0] returned [(1, 0.0), (3, 1.0)] for both the serialized blob and the JSON text. Passing a plain list raised `sqlite3.ProgrammingError: Error binding parameter 1: type 'list' is not supported`. Tested with Python 3.13.15, SQLite 3.53.1, sqlite-vec 0.1.9.
