Dear developers,
When I run gpt directly from Windows cmd all works fine, but when I do the same from Python with subprocess
subprocess.call('gpt -h')
I am getting the following error.
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
Error: null
java.lang.ExceptionInInitializerError
at org.esa.s2tbx.dataio.gdal.GDALLoader.initGDAL(GDALLoader.java:54)
at org.esa.lib.gdal.activator.GDALPlugInActivator.start(GDALPlugInActivator.java:22)
at org.esa.snap.runtime.Engine.informActivators(Engine.java:222)
at org.esa.snap.runtime.Engine.lambda$start$0(Engine.java:121)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
at org.esa.snap.runtime.Engine.start(Engine.java:121)
at org.esa.snap.runtime.Engine.start(Engine.java:90)
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.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 48: C:\Miniconda\envs\plot\Library\bin\gdalinfo.exeC:\Program Files\GDAL\gdalinfo.exe
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at org.esa.s2tbx.dataio.gdal.OSCategory.getExecutableLocation(OSCategory.java:120)
at org.esa.s2tbx.dataio.gdal.GDALVersion.retrieveInstalledVersion(GDALVersion.java:166)
at org.esa.s2tbx.dataio.gdal.GDALVersion.<clinit>(GDALVersion.java:50)
... 16 more
As far as I could read there is something with two gdal version that I have - from osgeo (Miniconda) and system.
I do not think it is SNAP issue but rather Miniconda, but could you give a hint if you have faced it, please.