You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have SVS files stored on a Google Cloud Storage server, and would like to reference these files without creating a local copy of the object. To do this, I've successfully read the object as a stream and converted it from a BytesIO object to a bytes object using object.getvalue(). However, when I pass this bytes object into openslide.OpenSlide(bytes_object), I get the OpenSlideUnsupportedFormatError. From the documentation, it sounds like a str, bytes, or PathLike object is accepted, but I can't seem to get it to work. Any help is appreciated, thank you!
The text was updated successfully, but these errors were encountered:
The bytes object accepted by openslide.OpenSlide() is the path to the file, pre-encoded to bytes. This is useful for bypassing the default str -> bytes conversion if the filesystem path isn't encoded as UTF-8.
OpenSlide requires slide files to be accessible in the local filesystem. You could try mounting a FUSE filesystem that exposes Google Cloud Storage objects as local files. Without fairly aggressive prefetching and caching, though, you may find the I/O performance to be unacceptable.
Operating system
Platform
OpenSlide Python version
1.1.2
OpenSlide version
3.4.1
Slide format
SVS
Issue details
I have SVS files stored on a Google Cloud Storage server, and would like to reference these files without creating a local copy of the object. To do this, I've successfully read the object as a stream and converted it from a
BytesIO
object to abytes
object usingobject.getvalue()
. However, when I pass thisbytes
object into openslide.OpenSlide(bytes_object), I get the OpenSlideUnsupportedFormatError. From the documentation, it sounds like a str, bytes, or PathLike object is accepted, but I can't seem to get it to work. Any help is appreciated, thank you!The text was updated successfully, but these errors were encountered: