ome / ZarrReader

Other
6 stars 9 forks source link

Replace Doubles with Integers #7

Closed joshmoore closed 3 years ago

joshmoore commented 3 years ago

With this change (and finding a way to deal with the non-opening of directories) https://github.com/ome/ome_zarr_test_suite/pull/16 passes for:

pytest -svxk create-reader

Without this change the error is:

ZarrReader initializing /private/var/folders/z5/txc_jj6x5l5cm81r56ck1n9c0000gn/T/pytest-of-jamoore/pytest-13/test_create_reader_0/ome_zarr_create.zarr/.zattrs
Exception in thread "main" java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap')
    at loci.formats.in.ZarrReader.parseOmeroMetadata(ZarrReader.java:616)
    at loci.formats.in.ZarrReader.initFile(ZarrReader.java:223)
    at loci.formats.FormatReader.setId(FormatReader.java:1421)
    at loci.formats.ImageReader.setId(ImageReader.java:849)
    at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
    at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:1035)
    at loci.formats.tools.ImageInfo.main(ImageInfo.java:1121)
FAILED

============================================================== FAILURES ===============================================================
_________________________________________________________ test[create-reader] _________________________________________________________

source = <test_suite.GeneratedSource object at 0x1a39ff430>, suite = <test_suite.Suite object at 0x1a39ff670>

    def test(source: Source, suite: Suite) -> None:
        """
        Primary test matching all sources with all suites.
        """
        source.setup()
        try:
>           suite(source)

/Users/jamoore/opt/ome_zarr_test_suite/test_suite.py:195:
joshmoore commented 3 years ago

Doh. And now testing on 6001240.zarr I get:

Initializing reader
Exception in thread "main" java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')
    at loci.formats.in.ZarrReader.parseOmeroMetadata(ZarrReader.java:616)
    at loci.formats.in.ZarrReader.initFile(ZarrReader.java:223)
    at loci.formats.FormatReader.setId(FormatReader.java:1421)
    at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:650)
    at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:1035)
    at loci.formats.tools.ImageInfo.main(ImageInfo.java:1121)