GPT Error: No product reader found

Hi,

I am trying to use the gpt command to run graphs on my mac, though I am not having much luck.
This is the error I receive. I got it to work last night, but I am unable to replicate that success, and I am not sure what changed.
I’ve tried with the default Calibrate.xml and a subset graph I made myself, so I don’t think its a problem with the graph.

INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: No distribution folder found on Macintosh.
org.esa.snap.core.gpf.OperatorException: No product reader found for ‘/Users/rbiessel/hawaiiSubset.xml’
at org.esa.snap.core.gpf.main.DefaultCommandLineContext.readProduct(DefaultCommandLineContext.java:57)
at org.esa.snap.core.gpf.main.CommandLineTool.readProduct(CommandLineTool.java:521)
at org.esa.snap.core.gpf.main.CommandLineTool.addProduct(CommandLineTool.java:466)
at org.esa.snap.core.gpf.main.CommandLineTool.getSourceProductMap(CommandLineTool.java:454)
at org.esa.snap.core.gpf.main.CommandLineTool.runOperator(CommandLineTool.java:295)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:284)
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:54)
at org.esa.snap.core.gpf.main.GPT.main(GPT.java:34)
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$14(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:62)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
Error: No product reader found for ‘/Users/rbiessel/hawaiiSubset.xml’

Anyone have any ideas?

It seems something is wrong with call of gpt.
I guess hawaiiSubset.xml and Calibrate.xml are graphs but gpt tries to read them as a product.
Can you show the complete call to gpt?

I’m entering this command from within a nodejs app, but I get the same result when I use it the terminal.

/Applications/snap/bin/gpt gpt /Users/rbiessel/hawaiiSubset.xml

And here’s the subset graph, which I am just using to test

<graph id="Graph">
  <version>1.0</version>
  <node id="Read">
    <operator>Read</operator>
    <sources/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/Users/rbiessel/Documents/Products/Hawaii/S1B_IW_GRDH_1SDV_20180508T042948_20180508T043023_010825_013CA6_77D0.zip</file>
    </parameters>
  </node>
  <node id="Subset">
    <operator>Subset</operator>
    <sources>
      <sourceProduct refid="Read"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <sourceBands>Amplitude_VH,Amplitude_VV</sourceBands>
      <region>0,0,25136,23700</region>
      <geoRegion>POLYGON ((-154.75111389160156 19.644397735595703, -155.2371368408203 19.644397735595703, -155.2371368408203 19.258237838745117, -154.75111389160156 19.258237838745117, -154.75111389160156 19.644397735595703, -154.75111389160156 19.644397735595703))</geoRegion>
      <subSamplingX>1</subSamplingX>
      <subSamplingY>1</subSamplingY>
      <fullSwath>false</fullSwath>
      <tiePointGridNames/>
      <copyMetadata>true</copyMetadata>
    </parameters>
  </node>
  <node id="Write">
    <operator>Write</operator>
    <sources>
      <sourceProduct refid="Subset"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/Users/rbiessel/GRAPH_Subset_S1B_IW_GRDH_1SDV_20180508T042948_20180508T043023_010825_013CA6_77D0.dim</file>
      <formatName>BEAM-DIMAP</formatName>
    </parameters>
  </node>
  <applicationData id="Presentation">
    <Description/>
    <node id="Read">
            <displayPosition x="37.0" y="134.0"/>
    </node>
    <node id="Subset">
      <displayPosition x="208.0" y="147.0"/>
    </node>
    <node id="Write">
            <displayPosition x="455.0" y="135.0"/>
    </node>
  </applicationData>
</graph>

I think it was a problem with the executable path. I setup a linux machine and encountered the same problem. I then added the correct path and it seems to actually run the graph, (runs out of memory though).

For me, this looks like you are calling gpt two times.

This might work better:
/Applications/snap/bin/gpt /Users/rbiessel/hawaiiSubset.xml

1 Like

That’s probably why the path fixed it. Thanks! It’s helpful to have an extra set of eyes, kind of figured it was something stupid like that.

1 Like