bioio-devs / bioio

Image reading, metadata management, and image writing for Microscopy images in Python
https://bioio-devs.github.io/bioio/OVERVIEW.html
BSD 3-Clause "New" or "Revised" License
19 stars 1 forks source link

can't instantiate BioImage in v1.0 #29

Closed toloudis closed 3 months ago

toloudis commented 7 months ago

Describe the Bug

Exception has occurred: TypeError
Can't instantiate abstract class BioImage with abstract methods current_resolution_level, resolution_levels, set_resolution_level
  File "D:\src\aics\cellbrowser-tools\cellbrowser_tools\bin\make_zarr_timeseries_segs.py", line 236, in <module>
    im = BioImage(filepath, reader=CziReader)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class BioImage with abstract methods current_resolution_level, resolution_levels, set_resolution_level

Expected Behavior

class BioImage should instantiate without error

Reproduction

im = new BioImage

Environment

AlanWu886 commented 5 months ago

Hi,

Just FYI, I am having the same error when trying to load a .lif file. Here is the error message:

Traceback (most recent call last):
  File "C:\Users\mwu56\PycharmProjects\core\lif2tif\src\lif2tif.py", line 136, in <module>
    convert_lif2tif(file_list, output_path)
  File "C:\Users\mwu56\PycharmProjects\core\lif2tif\src\lif2tif.py", line 57, in convert_lif2tif
    lif = BioImage(os.path.realpath(img_file), reader=bioio_lif.Reader)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class BioImage with abstract methods current_resolution_level, resolution_levels, set_resolution_level

And below is the environment: Package Version


aiobotocore 2.11.1 aiohttp 3.9.1 aioitertools 0.11.0 aiosignal 1.3.1 annotated-types 0.6.0 asciitree 0.3.3 attrs 23.2.0 bioio 1.0.0 bioio-base 1.0.0 botocore 1.34.27 certifi 2023.11.17 charset-normalizer 3.3.2 click 8.1.7 cloudpickle 3.0.0 colorama 0.4.6 dask 2024.1.0 distributed 2024.1.0 fasteners 0.19 frozenlist 1.4.1 fsspec 2023.12.2 idna 3.6 imageio 2.27.0 imageio-ffmpeg 0.4.9 importlib-metadata 7.0.1 Jinja2 3.1.3 jmespath 1.0.1 lazy_loader 0.3 locket 1.0.0 lxml 5.1.0 MarkupSafe 2.1.4 msgpack 1.0.7 multidict 6.0.4 networkx 3.2.1 numcodecs 0.12.1 numpy 1.26.3 ome-types 0.4.5 ome-zarr 0.8.3 packaging 23.2 pandas 2.2.0 partd 1.4.1 pillow 10.2.0 pip 23.3.1 psutil 5.9.8 pydantic 2.5.3 pydantic-compat 0.1.2 pydantic_core 2.14.6 python-dateutil 2.8.2 pytz 2023.3.post1 PyYAML 6.0.1 requests 2.31.0 s3fs 2023.12.2 scikit-image 0.22.0 scipy 1.12.0 semver 3.0.2 setuptools 68.2.2 six 1.16.0 sortedcontainers 2.4.0 tblib 3.0.0 tifffile 2023.12.9 toolz 0.12.1 tornado 6.4 typing_extensions 4.9.0 tzdata 2023.4 urllib3 2.0.7 wheel 0.41.2 wrapt 1.16.0 xarray 2024.1.1 xsdata 24.1 yarl 1.9.4 zarr 2.16.1 zict 3.0.0 zipp 3.17.0

Thanks! Alan

toloudis commented 5 months ago

Hi,

Just FYI, I am having the same error when trying to load a .lif file. Here is the error message:

Thanks! Alan

Thank you Alan. We have resolved this in #30 but have not yet published a new version. We will get to that next week most likely.

SeanLeRoy commented 3 months ago

Released at 1.0.1