Closed SpontaneousDuck closed 11 months ago
Ok, sorry about that. I was being an idiot and using the tif output in stead of the actual ENVI files. Once I changed to using the correct files, the Read op works
Great 😀 Happy processing @SpontaneousDuck
Not sure if this is a
pyrosar
problem orSNAP
but I am trying to run additional SNAP Operations after preparing the SENTINEL-1 GRD file usinggeocode
. The code used to build the new test graph is below. On trying to open the resulting ENVI file, it looks like aNullPointerException
is thrown when trying to read the input ENVI file generated fromgeocode
. Thanks for the help!Rocky Linux 8.7
Conda environment
conda 0.23.0
read = parse_node('Read') read.parameters['file'] = 'input.tif' read.parameters['formatName'] = 'ENVI' workflow.insert_node(read)
write = parse_node('Write') write.parameters['file'] = 'output.tif' write.parameters['formatName'] = 'ENVI' workflow.insert_node(write, before=read.id)
workflow.write('output.xml')
execute(out_file+'.xml', cleanup=True, gpt_exceptions=None, gpt_args=None)
RuntimeError: Executing processing graph done. INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience. java.lang.NullPointerException at org.esa.snap.dataio.envi.HeaderParser.parse(HeaderParser.java:47) at org.esa.snap.dataio.envi.Header.(Header.java:25)
at org.esa.snap.dataio.envi.EnviProductReader.innerReadProductNodes(EnviProductReader.java:116)
at org.esa.snap.dataio.envi.EnviProductReader.readProductNodesImpl(EnviProductReader.java:94)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.snap.core.gpf.common.ReadOp.initialize(ReadOp.java:170)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:77)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:199)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:182)
at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:166)
at org.esa.snap.core.gpf.graph.GraphContext.(GraphContext.java:85)
at org.esa.snap.core.gpf.graph.GraphContext.(GraphContext.java:58)
at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:127)
at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:86)
at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:547)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:391)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:287)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
at org.esa.snap.core.gpf.main.GPT.run(GPT.java:59)
at org.esa.snap.core.gpf.main.GPT.main(GPT.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
at install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)
Error: java.lang.NullPointerException
[output.xml] failed with return code 1