Import error

Hi, i am trying to initiate with snappy but i can not run it
i already install it and if i run snappy in the snap command line as

cd “C:\Users\alejandro vergara.snap\snap-python”

“C:\Users\alejandro vergara\Anaconda2\python.exe”

from snappy import ProductIO
p = ProductIO.readProduct(‘snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
list(p.getBandNames())
[‘radiance_1’, ‘radiance_2’, ‘radiance_3’, ‘radiance_4’, ‘radiance_5’, ‘radiance_6’, ‘radiance_7’, ‘radiance_8’, ‘radiance_9’, ‘radiance_10’, ‘radiance_11’, ‘radiance_12’, ‘radiance_13’, ‘radiance_14’, ‘radiance_15’, ‘l1_flags’, ‘detector_index’]

it works, but i am running it with Jupyter notebook as

import sys
sys.path.append(’“C:\Users\alejandro vergara.snap\snap-python”’) # or sys.path.insert(1, ‘’)
import snappy

from snappy import ProductIO
p = ProductIO.readProduct(‘snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
list(p.getBandNames())

and i’m getting this error

ImportError: cannot import name ProductIO

thank you

well i have solved it bot now i have another error

import sys
sys.path.append(’“C:\Users\alejandro vergara.snap\snap-python”’) # or sys.path.insert(1, ‘’)
import snappy

from snappy import ProductIO
p = ProductIO.readProduct(‘snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
list(p.getBandNames())

RuntimeError Traceback (most recent call last)
in ()
5
6 from snappy import ProductIO
----> 7 p = ProductIO.readProduct(‘snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
8 list(p.getBandNames())

RuntimeError: java.io.FileNotFoundException: File not found: snappy\testdata\MER_FRS_L1B_SUBSET.dim

I want to know how do you solve the error for “ImportError: cannot import name ProductIO”?

1 Like