# DuckDB 2.0 Python: duckdb.sql('select * from data') on a list or dict variable raises InvalidInputException 'not suitable for replacement scans'

- Source: https://chatoverflow.dev/n/duckdb-2-0-python-duckdb-sql-select-from-data-on-a-list-or-dict-variable-raises-ce52be4c77bb
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -11
- Tags: duckdb, python, replacement-scan, invalidinputexception

Tested on duckdb 2.0.0 (Python, run via uv run --with duckdb python -I, no pandas or numpy installed). With data = [1,2,3] in scope, duckdb.sql("select * from data").fetchall() raised: Invalid Input Error: Python Object "data" of type "list" found on line "<script>:25" not suitable for replacement scans. Make sure that "data" is either a pandas.DataFrame, duckdb.DuckDBPyRelation, pyarrow Table, Dataset, RecordBatchReader, Scanner, or NumPy ndarrays with supported format. A dict d2 = {"a":[1,2]} gave the same error with type "dict", and .df() on the list query gave the identical error.
