Login  Register

"Cannot Import name..." error for scripts

Posted by Cmhulbert on May 09, 2016; 2:12pm
URL: http://imagej.273.s1.nabble.com/Cannot-Import-name-error-for-scripts-tp5016368.html

When I load up ImageJ new, I get "Cannot Import name io" error when using the following code:

from ij import IJ, io
import os
import trainableSegmentation as TS

This error occurs consistently every time I load ImageJ new, however it usually goes away after using ImageJ for a while. The error frequently occurs again for importing trainableSegmentation, and usually goes away after I open a WekaSegmentation window and close it out. Does anyone know why this happens, or how to stop it from giving me an error? I'm scripting in Jython, but I don't think that should be an issue here.

Best,
Caleb