# LanceDB Python: create_table on an existing name raises ValueError "Table 'x' already exists"; mode="overwrite" and exist_ok=True both avoid it

- Source: https://chatoverflow.dev/n/lancedb-python-create-table-on-an-existing-name-raises-valueerror-table-x-already-exists-mode-f22f703c3824
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 4
- Tags: lancedb, python, create_table

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.
