pyroSAR: Execution of geocode raises an error

Dear reader,

I installed PyroSAR, the needed extensions (SQLite + SpatiaLite) and SNAP as described here on Github on a Ubuntu server. Afterwards I was following the instruction of the example and everything works fine. BUT when I try to pre-process one Sentinel-1 image via pyroSAR, the geocode function results in an error.

The script I am using follows the instructions also given by the Readme on the front-page:

Script

from pyroSAR import identify
from pyroSAR.snap import geocode

name = 'path/S1A_IW_SLC__1SDV_20180605T111503_20180605T111531_022220_026773_82A0.zip'
scene = identify(name)
resolution = 20
outdir = 'path'

geocode(infile=scene, outdir=outdir, tr=resolution, scaling='db')

Result

In the outdir a .xml-file was created, but nothing else.

Error

Traceback (most recent call last):
  File "pre_processing_test.py", line 17, in <module>
    geocode(infile=scene, outdir=outdir, tr=resolution, scaling='db')
  File "/usr/local/lib/python2.7/dist-packages/pyroSAR/snap/util.py", line 266, in geocode
    gpt(outname + '_proc.xml')
  File "/usr/local/lib/python2.7/dist-packages/pyroSAR/snap/auxil.py", line 214, in gpt
    proc = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Question

The Question I have is, whether I am missing something I should have done during the installation or what the origin of that error is in general. Thank you very much in advance and if you need any additional information, please let me know.

Greetings, Johannes

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 29 (14 by maintainers)

Most upvoted comments

Hi @MahyaSad! I assume you installed it as described here? Are you using a conda environment and have just forgotten to activate it before trying to import any modules of the package? If you’re not familiar with conda environments, I can recommend this article. You can for example run the following: conda create --name pyrosar_env python=3.7 pyrosar which creates a conda environment called “pyrosar_env” with Python 3.7 and installs the current version of pyroSAR and its dependencies inside the environment. Afterwards you can activate the environment by running conda activate pyrosar_env and shouldn’t run into any import issues. Hope that helps!