Skip to content

Commit

Permalink
[Data] Improve error message when reading HTTP files (#40462)
Browse files Browse the repository at this point in the history
If you try to read HTTP files with Ray Data, you get this error message if fsspect[http] isn't installed:

> Please install fsspec to read files from HTTP.

This PR updates the error message to clarify that you need the http extra:

> To read files from HTTP, run pip install fsspec[http].

Signed-off-by: Balaji Veeramani <[email protected]>
  • Loading branch information
bveeramani authored Oct 18, 2023
1 parent 8e86f25 commit 819733f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/data/datasource/file_based_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def _resolve_paths_and_filesystem(
from fsspec.implementations.http import HTTPFileSystem
except ModuleNotFoundError:
raise ImportError(
"Please install fsspec to read files from HTTP."
"To read files from HTTP, run `pip install fsspec[http]`."
) from None

resolved_filesystem = PyFileSystem(FSSpecHandler(HTTPFileSystem()))
Expand Down

0 comments on commit 819733f

Please sign in to comment.