glencoesoftware / raw2ometiff

Raw format to OME-TIFF converter
GNU General Public License v2.0
46 stars 20 forks source link

Error while calling command : path is not a valid path or not a directory #102

Closed ltalignani closed 1 year ago

ltalignani commented 1 year ago

Dear all, I have a problem while converting a .mrxs file.

I installed bioformats2raw and raw2ometiff with conda. I made a specific conda environment for these tools. As I am working on Mac M1 pro, I used the following command to create the environment to be sure that it will work:

CONDA_SUBDIR=osx-64 conda create -n mrxs
conda activate mrxs
conda config --env --set subdir osx-64

Then, I used bioformats2raw to convert the .mrxs as recommended by the README:

bioformats2raw test_good.mrxs zarr-pyramid/

And I tried to use raw2ometiff:

raw2ometiff zarr-pyramid/ pyramid.tiff

And I obtained this error:

Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.glencoesoftware.pyramid.PyramidFromDirectoryWriter@63a12c68): java.lang.RuntimeException: java.io.IOException: Path '/Users/loictalignani/mrxs/zarr-pyramid/2' is not a valid path or not a directory.
    at picocli.CommandLine.executeUserObject(CommandLine.java:1792)
    at picocli.CommandLine.access$900(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2150)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2144)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
    at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1968)
    at picocli.CommandLine.parseWithHandlers(CommandLine.java:2349)
    at picocli.CommandLine.parseWithHandler(CommandLine.java:2284)
    at picocli.CommandLine.call(CommandLine.java:2560)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.main(PyramidFromDirectoryWriter.java:210)
Caused by: java.lang.RuntimeException: java.io.IOException: Path '/Users/loictalignani/mrxs/zarr-pyramid/2' is not a valid path or not a directory.
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:241)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:97)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
    ... 9 more
Caused by: java.io.IOException: Path '/Users/loictalignani/mrxs/zarr-pyramid/2' is not a valid path or not a directory.
    at com.bc.zarr.ZarrUtils.ensureDirectory(ZarrUtils.java:159)
    at com.bc.zarr.ZarrGroup.open(ZarrGroup.java:94)
    at com.bc.zarr.ZarrGroup.open(ZarrGroup.java:87)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.getZarrGroup(PyramidFromDirectoryWriter.java:497)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.findNumberOfResolutions(PyramidFromDirectoryWriter.java:551)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.initialize(PyramidFromDirectoryWriter.java:648)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:227)
    ... 11 more

I don't understand why the path indicated in the error is zarr-pyramid/2.

So far, I don't understand where the error came from. I need a little help. Our lab is currently not able to operate the brand new slide scanner. Thanks in advance.

ltalignani commented 1 year ago

I forgot to indicate that the zarr-pyramid directory contains three directories named 0, 1 and OME. The OME directory contains an xml file. the two others directories are not empty.

Conda installed bioformats2raw, raw2ometiff and openjdk 11.0.9

melissalinkert commented 1 year ago

@ltalignani : Errors like this usually occur when the bioformats2raw and raw2ometiff versions are incompatible. Please try with the most recent versions, which are bioformats2raw 0.6.1 and raw2ometiff 0.4.1, and see if that works any better. Note that we do not support conda, this is provided separately by the OME team.

See also #93.

ltalignani commented 1 year ago

Dear @melissalinkert, Thanks for your comment. I used conda to install these two programs. bioformats2raw version is 0.6.1, but the problem comes from raw2ometiff version, which is 0.3.0. I will try to install the latest version.

ltalignani commented 1 year ago

I installed raw2ometiff directly and it worked perfectly. Thanks a lot for your help.

Is there a possibility that you update the conda version of this program (0.3 -> 0.4.1)?

sbesson commented 1 year ago

@ltalignani the Conda recipe for raw2ometiff is separate from this repository and maintained by the OME team. You might want to open an issue against https://github.com/ome/conda-raw2ometiff which is the relevant repository to ask about the update.

ltalignani commented 1 year ago

OK @sbesson, Thanks a lot. I close this issue

jburel commented 1 year ago

The conda recipe has now been updated