QuPath StarDist error message

I am trying to use StarDist from within QuPath however keep getting this error message (attached in second post) when I try to install/build. I have run ‘gradlew clean’ multiple times; I am updated to QuPath 0.2.3

Ah, a few things changed in Java 15 and they are causing a lot of problems. This looks like one of them. There’s an issue on GitHub at https://github.com/qupath/qupath/issues/615

If you’re able to use Java 14 instead it should work.

Thank you Pete for your reply. So nice to see ‘build successful’ at the end :sweat_smile:

1 Like

So having changed to Java14 the build was successful however when I run the script on the QuPath-StarDist page I get an error (in the attached image).

Not sure what Ive missed…

What command did you use to build it? It should be something like

gradlew clean build createPackage -Ptensorflow-cpu=true

where if the -Ptensorflow-cpu=true bit is missing/has a typo then I’d expect things to fail in that way. (During the building, it should log some messages to indicate whether or not it’s using TensorFlow, which is needed for StarDist)

1 Like

Yep, I copy and pasted that script. The command line script also says 'requesting tensorflow(CPU) subproject.

Do you see TensorFlow if you go to Help → Installed extensions?
Or see any hints in QuPath under View → Show log?

No it isnt listed in the ‘installed extensions’
The log just shows the same error as was in the script editor.

But I did get a ‘build successful’ after I ran the ‘gradlew’ command you posted earlier. Do I need to close and reopen QuPath for it to register?

Are you running the version of QuPath that was built? Starting from the directory where you ran gradlew, it should be found under ./build/dist.

You’ll need to restart it after building (it might not even let you build it if the ./build/dist already exists – I’m not certain).

Ive restarted QuPath but no success. And looking at the command line output its using QuPath 0.2.3 which is what I built.
Im not sure how to check it through the ./build/dist?

After running

gradlew clean build createPackage -Ptensorflow-cpu=true

you can then run

open ./build/dist/QuPath-0.2.3.app

to make sure that the correct version of QuPath is being started.

1 Like

Solved - thank you so much!!

1 Like

Hello, I have tried building qupath with the gradlew clean build createPackage -Ptensorflow-cpu=true command however I have been getting error

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\BMIF\Documents\GitHub\qupath\build.gradle’ line: 573

  • What went wrong:
    A problem occurred evaluating root project ‘qupath’.

Could not resolve all files for configuration ‘:runtimeClasspath’.
Could not find tensorflow-1.15.2-1.5.3-windows-x86.jar (org.bytedeco:tensorflow:1.15.2-1.5.3).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/bytedeco/tensorflow/1.15.2-1.5.3/tensorflow-1.15.2-1.5.3-windows-x86.jar
Could not find mkl-dnn-0.21.4-1.5.3-windows-x86.jar (org.bytedeco:mkl-dnn:0.21.4-1.5.3).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/bytedeco/mkl-dnn/0.21.4-1.5.3/mkl-dnn-0.21.4-1.5.3-windows-x86.jar

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s

C:\Users\BMIF\Documents\GitHub\qupath>

Have I missed some step in the installation?

Hi @Ivet it looks like you’re running this on a 32-bit Windows computer. Unfortunately, QuPath only supports 64-bit Windows.

Hi Pete

The computer is definitely 64bit, I have other Qupath versions installed and they run fine

Ah ok, that’s good. Then my guess is that you’re using a 32-bit version of Java. If so, the build.gradle script should identify this and print a warning:

The solution should be to make sure you see x64 in the version of Java you download, e.g. from AdoptOpenJDK.

Note that you’ll need Java 14 (since Java 15 isn’t supported, and we plan to jump straight to Java 16 next – since it is released tomorrow).

1 Like

Thank you Pete so much, the reinstallation of the Java 14 seemed to fix the problem, I managed to build the Qupath package.
I have one more question. I am trying to run the StarDist script but I am not sure in which directory I should place the dsb2018-heavy-augment folder.

2 Likes