diff --git a/fsspec/utils.py b/fsspec/utils.py index 34f1ad821..543bd89d7 100644 --- a/fsspec/utils.py +++ b/fsspec/utils.py @@ -436,6 +436,7 @@ def isfilelike(f: Any) -> TypeGuard[IO[bytes]]: def get_protocol(url: str) -> str: + url = stringify_path(url) parts = re.split(r"(\:\:|\://)", url, 1) if len(parts) > 1: return parts[0]