Skip to content

Commit

Permalink
chore(exportable): update exception message and errors imports (#3435)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarnphm committed Jan 18, 2023
1 parent cecc604 commit dd0ba84
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit dd0ba84

Please sign in to comment.