org.geotools.styling.StyleFactory is not an ImageIO SPI class



I have been trying to install the SNAP Python API on my Macbook. Everything (snappy, jpy, SNAP 6 itself) has installed correctly (I think) and I can import snappy without a problem. When I wanted to try the first example proposed at Atlassian, I got the following error:

RuntimeError: java.lang.IllegalArgumentException: org.geotools.styling.StyleFactory is not an ImageIO SPI class

This is caused by the function ProductIO():

p = ProductIO.readProduct()

I was first using Java 10, but after I did some research on this error, it said that Geotools only works with Java up to version 8. After reverting to Java 8, I still got the same error message.
I tried some other example from the snappy example folder, such as, and they work without a problem.

Does anyone have a solution to this problem?


Hi Thibauld! I had the same yesterday in OSX 10.14, conda/Python 3.6, Java 10. I tried different jpy builds and OLCI data, but in the end it was the downgrading to Java 8 (and re-building jpy) that helped. Did you make sure that the snappy process uses your Java 8 installation?


Hi! Thanks for the answer. I also thought this was the problem. But I eventually switched to the use of a Docker container and my scripts are running smoothly inside the container.