Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(exportable): update exception message and errors imports #3435

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/bentoml/_internal/exportable.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import fs.mirror
import fs.opener
import fs.tempfs
import fs.opener.errors
from fs import open_fs
from fs.base import FS

Expand Down Expand Up @@ -71,7 +72,7 @@ def import_from(
) -> T:
try:
parsedurl = fs.opener.parse(path)
except fs.opener.errors.ParseError: # type: ignore (FS types)
except fs.opener.errors.ParseError:
if protocol is None:
protocol = "osfs"
resource: str = path if os.sep == "/" else path.replace(os.sep, "/")
Expand All @@ -93,7 +94,7 @@ def import_from(
if protocol not in fs.opener.registry.protocols: # type: ignore (FS types)
if protocol == "s3":
raise ValueError(
"Tried to open an S3 url but the protocol is not registered; did you 'pip install fs-s3fs'?"
"Tried to open an S3 url but the protocol is not registered; did you 'pip install \"bentoml[aws]\"'?"
)
else:
raise ValueError(
Expand Down