Skip to content

Error writing dataset in overwrite mode #792

@changhiskhan

Description

@changhiskhan

If mode="overwrite" and the dataset does not exist, it's supposed to act like "create" but currently it raises an error:

Traceback (most recent call last):
  File "/Users/changshe/code/Image-Search-Service/./populate_db.py", line 41, in <module>
    tbl = populate_db(df, embed_func=dummy_func)
  File "/Users/changshe/code/Image-Search-Service/./populate_db.py", line 24, in populate_db
    tbl = db.create_table('unsplash', data, mode="overwrite")
  File "/Users/changshe/code/eto/lancedb/python/lancedb/db.py", line 89, in create_table
    tbl = LanceTable.create(self, name, data, schema, mode=mode)
  File "/Users/changshe/code/eto/lancedb/python/lancedb/table.py", line 182, in create
    lance.write_dataset(data, tbl._dataset_uri, mode=mode)
  File "/Users/changshe/.venv/lance/lib/python3.10/site-packages/lance/dataset.py", line 654, in write_dataset
    _write_dataset(reader, uri, params)
OSError: LanceError(I/O): Object at location /Users/changshe/code/Image-Search-Service/lance.db/unsplash.lance/_latest.manifest not found: No such file or directory (os error 2)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions