Open NichD opened 1 year ago
Hi @NichD, Sorry to hear you're having this issue. I believe it's the scyjava package (https://github.com/scijava/scyjava) that is trying to use Maven to download the bio-formats jar file. What happens when you do the following?
import jpype
import scyjava
scyjava.config.endpoints.append('ome:formats-gpl')
scyjava.start_jvm()
loci = jpype.JPackage("loci")
loci.common.DebugTools.setRootLevel("ERROR")
I think it should try to initialize the bio formats jar (which is used to read the images), and then download it if it isn't already available.
Best, Chandler
Hello @cdgatenbee
Thank you for your swift reply. I attempted to execute the lines you shared. I get the same error I was previously seeing when I call scyjava.start_jvm()
- see below.
import jpype import scyjava scyjava.config.endpoints.append('ome:formats-gpl') scyjava.start_jvm() Failed to bootstrap the artifact.
Possible solutions:
- Double check the endpoint for correctness (https://search.maven.org/).
- Add needed repositories to ~/.jgorc [repositories] block (see README).
- Try with an explicit version number (release metadata might be wrong).
Full Maven error output:
Traceback (most recent call last): File "
", line 1, in File "C:\git\python_envs\dev\lib\site-packages\scyjava_java.py", line 177, in startjvm , workspace = jgo.resolve_dependencies( File "C:\git\python_envs\dev\lib\site-packages\jgo\jgo.py", line 665, in resolve_dependencies raise e File "C:\git\python_envs\dev\lib\site-packages\jgo\jgo.py", line 636, in resolve_dependencies mvn_out = run_and_combine_outputs(mvn, mvn_args) File "C:\git\python_envs\dev\lib\site-packages\jgo\jgo.py", line 274, in run_and_combine_outputs return subprocess.check_output(command_string, stderr=subprocess.STDOUT) File "C:\Program Files\Python39\lib\subprocess.py", line 424, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Program Files\Python39\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '('C:\git\apache-maven-3.8.6\bin\mvn.CMD', '-B', '-f', 'C:\Users\NPDan\.jgo\ome\formats-gpl\LATEST\dc8f1caa0a5878494c2f101093d1f134928f44dbbc2ed07f928b4eded0617664\pom.xml', 'dependency:resolve')' returned non-zero exit status 1. loci = jpype.JPackage("loci") loci.common.DebugTools.setRootLevel("ERROR") Traceback (most recent call last): File "
", line 1, in RuntimeError: Unable to import 'loci.common' without JVM
Clearly something isn't happy with my java environment. Should my JAVA_HOME
variable point to the JRE I have installed, or the JDK? Any other suggestions?
Also, would it matter that I have Java 19 (recently downloaded)? Would reverting to Java 17 resolve this?
Thanks!
Hi @NichD,
Sorry for the delayed response. I believe your JAVA_HOME
should be pointing to your JDK. When I echo $JAVA_HOME
on my M1 Mac it points to my mambaforge JVM (mambaforge/lib/jvm), and on my intel Mac it was "usr/libexec/java_home". As far as versions go, mine is Java 17, so unfortunately I can't say if Java 19 is the problem or not. Also, as a last resort, and if you haven't already, you could try installing the packages in a conda/mamba environment? That might ensure that scyjava is linked up to the JVM correctly.
Hi @cdgatenbee - It's my turn to apologize as I've been traveling for much of this month. I'll update my Java install to use 17 and, failing that, try installing via Anaconda. Thank you for the suggestions.
@cdgatenbee I wanted to follow up with you. I was not able to get VALIS working on my Windows laptop, but I was able to get the install completed on a Linux system. I did need to install Maven on that system in order to use the JVM and execute the image registration.
I found a related ImageJ - Maven thread here. I suspect there's still some issues with the JAVA_HOME
and Maven paths, which I may revisit on my Windows system when I have time.
You may want to update the installation instructions to include download and install of Maven, as that seemed to be necessary on both systems. Thanks for your help and let me know if I can assist at all!
Sorry you weren't able to get VALIS working on your Windows machine, @NichD. I wish I could have been more helpful. I agree that I need to update the installation instructions to include the need for Maven, and will do so soon.
Best, -Chandler
any updates on this?
I can't register images on Windows neither. Exact same error.
Hi @seiryoku-zenyo,
I've made some updates to help with other Windows issues, but the challenge is that I don't have a Windows machine to debug with, so right now I can only make best guesses at what the issues are. I am working on trying to get access to a Windows machine at work though, so hopefully soon I'll be better able to work on issues like these. In the meantime, can you see if the Docker container will work for you?
Best, -Chandler
Hello - I've been trying to use
valis-wsi
to register a series of Leica CZI H&E slide images. I've had some success using Matlab tools to register this dataset, and I wanted to compare those results to Valis.Unfortunately, I can't get
valis-wsi
to initialize in theregistration.Valis
call, as it seems that a call using Maven is failing. This is after I've downloaded and verifiedpyvips
andlibvips
, and verified that the latter is on the PATH. I've also verified Maven is on the PATH, but am still encountering issues.Here is a sample script I have, which points to a directory of image files. I've also included the error message below.
And the error message I receive:
Unfortunately, the python script fails on Valis initialization (
registrar = registration.Valis(slide_src_dir, results_dst_dir, reference_img_f=reference_slide)
). Any insight or help with this would be welcome. Thanks in advance!