Error when using ChannelSeparator to read dimensions of an image from the file header

I’m running a simple program to find out the dimensions of an image from the header of the file:

from loci.formats import ChannelSeparator

fr = ChannelSeparator()

print fr.getSizeX(), fr.getSizeY()

And I am getting this error, which I don’t understand. It’s as if the bioformats library is missing file readers? My Fiji is updated to today.

Caused by: java.lang.NoSuchMethodError: loci.common.RandomAccessInputStream.readUnsignedInt()J
	at loci.formats.tiff.TiffParser.getNextOffset(
	at loci.formats.tiff.TiffParser.getFirstOffset(
	at loci.formats.tiff.TiffParser.getFirstIFD(
	at loci.formats.FormatReader.isThisType(
	at loci.formats.ImageReader.isThisType(
	at loci.formats.ImageReader.getReader(
	at loci.formats.ImageReader.setId(
	at loci.formats.ReaderWrapper.setId(
	at loci.formats.ChannelSeparator.setId(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.python.core.PyReflectedFunction.__call__(
	... 24 more

Any ideas on what could be going wrong, @ctrueden @melissa ?

Thank you.

Including the bio-formats update site and restarting fiji solved the issue–meaning, the issue is solved in the newest bio-formats jars.

@albertcardona this looks similar to the issue reported here. I am pretty certain we had identified the source of this issue to be a conflict between incompatible JARs with @ctrueden

Can you check whether you have both formats-common and ome-common JARs installed in your Fiji distribution? If so, the first one is causing the issue you are seeing.