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
Relatively recent changes to fsspec have caused an incompatibility here. We would like to be able to run code like this:
from aicspylibczi import CziFile
from fsspec.core import url_to_fs
img='path/to/file.czi'
fs, path = url_to_fs(img)
with fs.open(path) as open_resource:
c = CziFile(open_resource)
The CziFile constructor leads to running this code:
_aicspylibczi.Reader(open_resource)
but the pybind11 code that converts the constructor argument from a BufferedReader to a libCZI IStream does not work with fsspec.implementations.local.LocalFileOpener (which is a subclass of io.IOBase).
There is a workaround, which is to pass open_resource.f to the CziFile constructor
Relevant code:
CziFile.py line 57 and 63
pb_caster_BytesIO.h line 20 and 33
The text was updated successfully, but these errors were encountered:
Relatively recent changes to fsspec have caused an incompatibility here. We would like to be able to run code like this:
The
CziFile
constructor leads to running this code:but the pybind11 code that converts the constructor argument from a BufferedReader to a libCZI IStream does not work with
fsspec.implementations.local.LocalFileOpener
(which is a subclass ofio.IOBase
).There is a workaround, which is to pass
open_resource.f
to the CziFile constructorRelevant code:
CziFile.py line 57 and 63
pb_caster_BytesIO.h line 20 and 33
The text was updated successfully, but these errors were encountered: