I’m attempting to read an L1C file in snappy. Snappy itself is working (testing a dim file)
This is ipython error
In [20]: sourceProduct=ProductIO.readProduct(infname)
…:
…:
INFO: org.esa.s2tbx.dataio.s2.ortho.S2OrthoProductReaderPlugIn: Building product reader - EPSG:32626
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [metadata_level] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [granuleidentifier] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
RuntimeError Traceback (most recent call last)
in
----> 1 sourceProduct=ProductIO.readProduct(infname)
2
RuntimeError: java.lang.NoClassDefFoundError: org/esa/snap/jp2/reader/internal/BandMatrixCell
and this is the code
import snappy as snappy
from snappy import ProductIO
from snappy import GPF as GPF
from snappy import Hashmap
snappy.GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis() # Load all available operators
parameters1 = Hashmap()
parameters2 = Hashmap()
infname='/cleo03/storage/data/ESA/S2A/L1C/2022/04/S2A_MSIL1C_20220419T161831_N0400_R040_T16RGV_20220419T202622.SAFE'
outfname='/home/mariomi/data/test1'
sourceProduct=ProductIO.readProduct(infname)