diff --git a/fsspec/implementations/zip.py b/fsspec/implementations/zip.py index 91c8ec4f4..f828a6841 100644 --- a/fsspec/implementations/zip.py +++ b/fsspec/implementations/zip.py @@ -113,10 +113,10 @@ def _open( path = self._strip_protocol(path) if "r" in mode and self.mode in set("wa"): if self.exists(path): - raise IOError("ZipFS can only be open for reading or writing, not both") + raise OSError("ZipFS can only be open for reading or writing, not both") raise FileNotFoundError(path) if "r" in self.mode and "w" in mode: - raise IOError("ZipFS can only be open for reading or writing, not both") + raise OSError("ZipFS can only be open for reading or writing, not both") out = self.zip.open(path, mode.strip("b")) if "r" in mode: info = self.info(path)