Snappy configuration failed with exit code 30(SNAP 8.0 + Python3.6.8)

Hello everyone, recently I need to use ESA SNAP snappy to batch process Sentinel 1 data. The following problems occurred when configuring Python and snappy:
The Python version is Python3.6.8
The SNAP version is SNAP 8.0
Computer Operating System: Win10
The content of the error is ‘Snappy configuration failed with exit code 30’
When I follow the content of the error report and the prompt, I will locate jpy-0.9.0-cp36-cp36m-win in the directory D:\Python\Python36\Lib\site-packages\snappy\lib. When jpy-0.9.0-cp36-cp36m-win_amd64.whl is opened, the file contents are as follows:


In addition, the following is the process of installing the software and configuring snappy and python:
111
112




I don’t know where the problem is, I hope you can help me solve this problem, thank you very much!

Have you tried the solution of the previous similar error report?

If you run the simple test from Configure Python to use the SNAP-Python (snappy) interface in a terminal you may get additional detail that can be pasted as text.

Note: Whenever possible, please post error messages, etc. as inline text. Your images are hard to view on a laptop screen and the text is not searchable so your post is invisible to future users with similar problems.

2 Likes

On my Windows 10 (Python 3.6.5 from SenET, SNAP 8.0.8 64-bit, JDK 17.0.1, apache-maven-3.8.3)

“ERROR: Configuration failed with exit code 30”

in fact means that snappy is installed and works. It’s just that imports succeed only from the second time:

try:
    from snappy import ProductIO, Product, ProductData, ProductUtils, String
except RuntimeError:
    print('trying second time')

from snappy import ProductIO, Product, ProductData, ProductUtils, String
1 Like

I’ve tried every step for solving this problem, but the error code 30 still exists.
I don’t know why, who can help me to solve this error? (SNAP 9.0 + Python 3.6.13)

THE ERROR:

PS I:\snap\bin> snappy-conf I:\Anaconda\envs\snap\python.exe I:\Anaconda\envs\snap\Lib\site-packages

The launcher has determined that the parent process has a console and will reuse it for its own console output.
Closing the console will result in termination of the running program.
Use ‘–console suppress’ to suppress console output.
Use ‘–console new’ to create a separate console window.
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Configuring SNAP-Python interface…
java.io.IOException: Python configuration failed.
Command [I:\Anaconda\envs\snap\python.exe .\snappyutil.py --snap_home I:\snap --java_module I:\snap\snap\modules\org-esa-snap-snap-python.jar --force --log_file .\snappyutil.log --jvm_max_mem 22G --java_home I:\snap\jre\jre --req_arch amd64]
failed with return code 30.
Please check the log file ‘I:\Anaconda\envs\snap\Lib\site-packages\snappy\snappyutil.log’.
at org.esa.snap.python.PyBridge.configureJpy(PyBridge.java:232)
at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:149)
at org.esa.snap.rcp.cli.SnapArgsProcessor.processPython(SnapArgsProcessor.java:103)
at org.esa.snap.rcp.cli.SnapArgsProcessor.process(SnapArgsProcessor.java:49)
at org.netbeans.modules.sendopts.DefaultProcessor.process(DefaultProcessor.java:202)
at org.netbeans.spi.sendopts.Option$1.process(Option.java:387)
at org.netbeans.api.sendopts.CommandLine.process(CommandLine.java:317)
at org.netbeans.modules.sendopts.HandlerImpl.execute(HandlerImpl.java:62)
at org.netbeans.modules.sendopts.Handler.cli(Handler.java:69)
at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
at org.netbeans.core.startup.CLICoreBridge.cli(CLICoreBridge.java:82)
at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
at org.netbeans.CLIHandler$1.exec(CLIHandler.java:268)
at org.netbeans.CLIHandler.finishInitialization(CLIHandler.java:447)
at org.netbeans.MainImpl.finishInitialization(MainImpl.java:256)
at org.netbeans.Main.finishInitialization(Main.java:92)
at org.netbeans.core.startup.Main.start(Main.java:316)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:748)
Python configuration error: Python configuration failed.
Command [I:\Anaconda\envs\snap\python.exe .\snappyutil.py --snap_home I:\snap --java_module I:\snap\snap\modules\org-esa-snap-snap-python.jar --force --log_file .\snappyutil.log --jvm_max_mem 22G --java_home I:\snap\jre\jre --req_arch amd64]
failed with return code 30.
Please check the log file ‘I:\Anaconda\envs\snap\Lib\site-packages\snappy\snappyutil.log’.
PS I:\snap\bin>

1 Like

What is the reason to use Python wrapper around Java codes? If you prefer Python, use Python InSAR PyGMTSAR: GitHub - AlexeyPechnikov/pygmtsar: PyGMTSAR (Python InSAR): Powerful and Accessible Satellite Interferometry

I would like to preprocess the sar data by python. Can I do it by PyGMTSAR?

PyGMTSAR (Python InSAR) is a Sentinel-1 A/B satellite data processor with SBAS and PSI analysis, 3D visualizations, and more. It is completely open-source and does not require MATLAB or other commercial software. You can find interactive examples online on the project’s GitHub listed above. Additionally, a ChatGPT-4 based AI virtual assistant, PyGMTSAR AI, can assist you in your InSAR projects: ChatGPT - PyGMTSAR Assistant