segment-anything-models-java/SAMJ-IJ

Failure on model installation

AliasRoger opened this issue · 7 comments

Hello,
when I was trying to install one of the models, it showed this error, it seems the path has been read twice causing the ":" to appear twice. I am not sure what the problem is, could you give some advice.

java.nio.file.InvalidPathException: Illegal char <:> at index 63: D:\Program Files (x86)\fiji-win64\Fiji.app\appose_x86_64\envs\D:\Program Files (x86)\fiji-win64\Fiji.app\appose_x86_64\envs\efficientvit_sam_env
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at io.bioimage.modelrunner.apposed.appose.Mamba.runPythonIn(Mamba.java:995)
at io.bioimage.modelrunner.apposed.appose.Mamba.pipInstallIn(Mamba.java:920)
at io.bioimage.modelrunner.apposed.appose.Mamba.installApposeFromSource(Mamba.java:1698)
at io.bioimage.modelrunner.apposed.appose.Mamba.create(Mamba.java:667)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAMPython(SamEnvManager.java:652)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAMPython(SamEnvManager.java:626)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAM(SamEnvManager.java:1058)
at ai.nets.samj.gui.SAMModelPanel.lambda$createInstallationThread$7(SAMModelPanel.java:313)
at java.lang.Thread.run(Thread.java:750)

I put the Fiji.app dir to the c disk, it still gives this error.

java.nio.file.InvalidPathException: Illegal char <:> at index 32: C:\Fiji.app\appose_x86_64\envs\C:\Fiji.app\appose_x86_64\envs\efficientvit_sam_env
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at io.bioimage.modelrunner.apposed.appose.Mamba.runPythonIn(Mamba.java:995)
at io.bioimage.modelrunner.apposed.appose.Mamba.pipInstallIn(Mamba.java:920)
at io.bioimage.modelrunner.apposed.appose.Mamba.installApposeFromSource(Mamba.java:1698)
at io.bioimage.modelrunner.apposed.appose.Mamba.create(Mamba.java:667)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAMPython(SamEnvManager.java:652)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAMPython(SamEnvManager.java:626)
at ai.nets.samj.install.SamEnvManager.installEfficientViTSAM(SamEnvManager.java:1058)
at ai.nets.samj.gui.SAMModelPanel.lambda$createInstallationThread$7(SAMModelPanel.java:313)
at java.lang.Thread.run(Thread.java:750)

mmmmm this is weird, I will have a look and get you back!

I have encountered the exactly the same issue. My system is windows 11 pro and the version is imageJ 1.54f.

Hello @AliasRoger and @pix2data and sorry for the dealy and inconvenience.

The problem should be solved now, thanks for reporting. It was a general issue on Windows.

Please let me know if it works on you computers and I will close the issue.

REgards,
Carlos

Hi Carlos,

Thanks a lot for the update, I just tried it, and it works for me now.

Kind regards,
Roger

Hi Carlos,

Thank you so much for the update, it works!

Thanks a lot for developing SAMJ, it is such a wonderful tool!

Regards,

Victor

Glad you find it useful!!
I hope you also like the features we are going to be adding soon :)