DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

Fix delayed warning about missing OpenSlide installation on Windows #83

Closed nlessmann closed 2 years ago

nlessmann commented 2 years ago

openslide-python now raises a ModuleNotFoundError when the module is imported but fails to open the OpenSlide DLL on Windows. This used to result in a FileNotFoundError, which is caught in panimg to enable using the library without an OpenSlide installation.

See https://github.com/openslide/openslide-python/commit/2e6d06a564eeccbad2892b39961d21ad32d9cbd5

openslide-python catches these errors only on Windows and Mac OS, so I think we still need to catch OSErrors in case the library is not installed on Linux.

jmsmkn commented 2 years ago

We do not officially support Windows or MacOS as we do not have the CI infrastructure to test this, but I am happy to accept any PRs that help make it work (like this one).