File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,10 @@ def read_table_metadata(
265265 ignore_empty = ignore_empty ,
266266 s3_additional_kwargs = s3_additional_kwargs ,
267267 )
268+
269+ if len (paths ) < 1 :
270+ raise exceptions .NoFilesFound (f"No files Found: { path } ." )
271+
268272 version_ids = _check_version_id (paths = paths , version_id = version_id )
269273
270274 # Files
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ def test_read_parquet_metadata_nulls(path):
5757 assert columns_types .get ("c2" ) == "string"
5858
5959
60+ def test_read_parquet_metadata_nonexistent_file (path ):
61+ with pytest .raises (wr .exceptions .NoFilesFound ):
62+ wr .s3 .read_parquet_metadata (path + "non-existent-file.parquet" )
63+
64+
6065@pytest .mark .parametrize (
6166 "partition_cols" ,
6267 [
You can’t perform that action at this time.
0 commit comments