Skip to content

Commit

Permalink
Better error for failed wildcard path in dd.read_csv() (fixes #8878) (
Browse files Browse the repository at this point in the history
#8908)

* better error for failed wildcard path #8878

* use f-string instead of % syntax

Co-authored-by: Roger Filmyer <rfilmyer@akamai.com>
  • Loading branch information
rfilmyer and Roger Filmyer committed Apr 13, 2022
1 parent 5d98727 commit 783b15b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dask/dataframe/io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ def read_pandas(
2
]

# Check for at least one valid path
if len(paths) == 0:
raise OSError(f"{urlpath} resolved to no files")

# Infer compression from first path
compression = infer_compression(paths[0])

Expand Down

0 comments on commit 783b15b

Please sign in to comment.