mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-27 15:12:53 +00:00
[Bug] Fix dataset path check in Table::open (#326)
Fixed a bug that prevents to open remote tables.
This commit is contained in:
@@ -534,7 +534,9 @@ class LanceTable(Table):
|
||||
@classmethod
|
||||
def open(cls, db, name):
|
||||
tbl = cls(db, name)
|
||||
if not os.path.exists(tbl._dataset_uri):
|
||||
fs, path = pa.fs.FileSystem.from_uri(tbl._dataset_uri)
|
||||
file_info = fs.get_file_info(path)
|
||||
if file_info.type != pa.fs.FileType.Directory:
|
||||
raise FileNotFoundError(
|
||||
f"Table {name} does not exist. Please first call db.create_table({name}, data)"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user