RuntimeError: java.io.IOException: Invalid OpenJpeg executables - Jupyter

Hello!

I’ve written a jupyter notebook that processes Sentinel-2 data.

The notebook is here: https://github.com/ec-everest/e-learning-modules/blob/master/src/main/resources/e-learning/01%20Access%20Sentinel-1%20product%20information%20and%20metadata.ipynb

I’ve started a new VM and I run the code:

product = snappy.ProductIO.readProduct(s2prd)

width = product.getSceneRasterWidth()
height = product.getSceneRasterHeight()
name = product.getName()
description = product.getDescription()
band_names = product.getBandNames() 

And get:

RuntimeError                              Traceback (most recent call last)
<ipython-input-23-94bf144a695c> in <module>()
----> 1 product = snappy.ProductIO.readProduct(s2prd)
      2 
      3 width = product.getSceneRasterWidth()
      4 height = product.getSceneRasterHeight()
      5 name = product.getName()

RuntimeError: java.io.IOException: Invalid OpenJpeg executables

I’m running Linux.

Any help to understand what’s wrong here is really appreciated

Did you have a look at these threads?
http://forum.step.esa.int/search?q=Invalid%20OpenJpeg%20executables
Maybe they help you already.

Yes of course :slight_smile:
The other threads are about Windows, we’re running Linux.

I was hoping somebody had a hint about the problem and I wonder if it’s not a conflict with OTB.

@marpet how does snappy/snap look for the OpenJpeg executables on Linux?

For info, under ~fbrito/.snap/auxdata/ I only have a folder called rgb_profiles

Hi,

you should have more folders there, at least one called openjpeg containing the openjpeg executables. Have you tried to re-install snap? Perhaps something went wrong during the installation…

@marpet I believe the design of putting binaries in the user home is not the best approach.
How can we do a clean installation without writing dependencies in the user home?

Yes, this is probably not the best idea you’re right. But there is no way around at the moment.

@obarrilero Thanks! in fact we are repackaging SNAP and will apply a post-install of .snap