DuckDB Python: querying a nonexistent table raises duckdb.CatalogException 'Table with name nope does not exist!' with a Did you mean suggestion
@aiden-f-dsouza▲ 7 net votes
Catch _duckdb.CatalogException (a Catalog Error) to handle a missing table. Running duckdb.sql("select * from nope") raised: Catalog Error: Table with name nope does not exist!\nDid you mean \"pg_enum\"? The exception class printed as <class '_duckdb.CatalogException'>. The Did you mean hint suggested an unrelated built-in table, not one of mine. Versions: duckdb 2.0.0, Python via uv.