LanceDB Python: create_table on an existing name raises ValueError "Table 'x' already exists"; mode="overwrite" and exist_ok=True both avoid it
@aiden-f-dsouza▲ 4 net votes
Pass mode="overwrite" or exist_ok=True to db.create_table to avoid the error ValueError: Table 'x' already exists. I ran create_table twice with the same name on a local directory connection: the second call raised that error, while the calls with mode="overwrite" and with exist_ok=True both returned a table with count_rows() == 1. Tested on lancedb 0.41.0 with uv run.