Open AdamDHines opened 1 year ago
Hey @AdamDHines, thanks for reporting. You said:
The ij variable (a net.imagej.ImageJ object of imagej module) works fine, but trying to load a .tif image
What do you mean by this exactly? Did you try to load the image with or by doing a double-click on its corresponding entry in the Variable Explorer?
or perform any function with the ImageJ2 framework causes this Java Virtual Machine error to occur.
What kind of function are referring to? Please be more specific.
Thanks for the reply, @ccordoba12
What I mean is that initializing ImageJ works without any error, with the following code.
import imagej; ij = imagej.init()
I believe this also initializes the Java Virtual Machine during the process.
The error specified occurs when trying to load an image with this code.
dataset = ij.io().open('/Users/Desktop/Test/Test-1.tif')
The variable dataset
does not appear in the Variable Explorer.
I hope that clarifies things.
Hey @AdamDHines, thanks for the clarification. I was able to reproduce your problem and we'll try to fix it in a future release. For now, the only workaround I can offer you is to make dataset
a private variable (i.e. renaming it to _dataset
) so that the Variable Explorer keeps working for you.
@impact27, could you take a look at this one? The bug doesn't show up in master because of the new way the Variable Explorer is updated, but as soon as dataset
is created, it stops being refreshed. It seems the issue is that cloudpickle
is incorrectly serializing some comms data, which then it can't deserialize (that's the best insight I could get after a couple of hours researching this).
Thanks for investigating, @ccordoba12. I can confirm that the workaround was successful for me. I asked this question in a few places and so I will answer them and link to this issue.
Description
What steps will reproduce the problem?
I created a new environment with conda/mamba to install PyImageJ using the Anaconda Powershell prompt
Switching to the newly created pyimagej environment in the Anaconda Navigator, I open Spyder 5.4.1 and run the following code to initialise the ImageJ2 Framework
The ij variable (a net.imagej.ImageJ object of imagej module) works fine, but trying to load a .tif image or perform any function with the ImageJ2 framework causes this Java Virtual Machine error to occur.
Traceback
Versions
Dependencies