Snap2stamps error

Does python2 -c 'import pathlib2 as pathlib' run without an error? If this works, you can save copies of the original python files that have from pathlib lines and edit the original files. There may be some differences between the now extinct python2 pathlib and pathlib2 – with luck Snap2Stamps doesn’t use things that changed.

i have this error, @ABraun @mdelgado , can you resolved that? i installed pathlib2 but the error comes up again.

“Traceback (most recent call last):
File “”, line 16, in
from pathlib import Path
ImportError: No module named pathlib”

I think you installed pathlib in the root, once try to process in the root.

I think it is a python problem, because I have a virtualbox with ubuntu 21 and it automatically gives me that I have python3.9, I also downloaded python2.7 and then pathlib but it says it is in the python3.9 repository

1 Like

If you use python 2.7 the pathlib package exists.
New release will support python 3.X etc…
Sorry for the delay on the new release

1 Like

Right now I am creating a new vbox with ubuntu 18.04 LS to see if it works and to see if it gives me the error previously indicated.
I state that 1 year ago I was using ubuntu 18.04 and I had no problems, then for reasons of space I had to delete it and now I created it with ubuntu 21, but this error occurred.

i read that python 2.7 is no longer supported by ubuntu 20 and 21, so i think my problem is this, i have installed a new version of ubuntu which doesn’t support python2.7 and consequently it creates me that error

No longer supported is not the same as no longer available. Unless your IT staff insist on only using “supported” versions, you should be able to install a distro package for python-2.7 in Ubuntu 20.04.

how do you go about telling him not to insist on using python3.9?

Some IT groups refuse to provide old software versions due to lack of security updates. If you have installed Python 2.7 without using the distro package then you need to arrange a way for Snap2stamps to use your Python 2.7, e.g., by creating a Python virtual environment (venv) and installing required Python modules to the venv. There are Python tutorials that explain how to use venv’s, including installing packages. If you aren’t allowed to use the distro Python 2.7 you can install it without elevated privileges from or Anaconda.

i install python2.7 in ubuntu18.04 and problem has been solved

1 Like

Not sure if this has been posted elsewhere already, but in case it helps, even with SNAP 8 (Ubuntu 18.04) I had to change those lines in all three coreg_ifg xml files to resolve Operator ‘SpectralDiversityOp’: Unknown element ‘useSuppliedShifts’ error.

Hello everyone,

I’m facing an issue during the export step of snap2stamps. As you can see in the image below, the export takes really a lot of time, ca. 40 min each (for comparison, the coregistration took 5/7 min each) while usually with the same computing resources emploied, it takes a few minutes. Furthermore, despite the export is marked as “succesfully completed”, there are several “severe” and a “warning” whose meaning is not clear to me. I fear that the exports will be somoheow “corrupted”.

I’m running this step with SNAP 7.0, I also tried with SNAP 8.0 but the folder INSAR_… was incomplete. In fact, using SNAP 8.0 the entire “dem” folder and the .diff and .base files for each export within the “diff0” folder were missing.

Does anyone have an idea about this issue or how to solve it?

Thank you in advance!

I feel it is due to a network issue.
Stamps export will take more time compared to the remaining steps.
Is there any error, while processing the coregistration and Enhanced spectral diversity step?

No, everything went well. I also cheked each inteferogram one by one to be sure they were created correctly. For network issue, do you mean some problem related to SNAP/Copernicus servers?

  1. For determining the lonmin, latmin, lonmax, latmax values for AOI use this below website.

Bounding Box Tool: Metadata Enrichment for Catalogue Records by Visually Selecting Geographic Coordinates (Latitude / Longitude) for Maps (

Instead of MARC format just select the CSV format, then directly copy those lat long to your project.conf file.

  1. Whatever area covering by master image (6 bursts) only will process. you will get result only master image covering area.
1 Like

Maybe the master image covers only that particular portion (only 6 bursts). Better you just change the master (Delete the old master image and try to incorporate another master image).

Better you just try to use Python script (snap2stamps). It is very easy to process.

GitHub - mdelgadoblasco/snap2stamps: Using SNAP as InSAR processor for StaMPS

1 Like

Hello everyone,

I’m having some problem with the coregistration and the stamps export steps

  1. Coregistration issue: using the most recent updated version of SNAP 8 it fails giving the error reported in the image below. I saw in other answers in the forum that the suggested solution is to download libgfortran3 or 5 but I already have both installed and related to a GCC v 10.3. I also tried to re-install them but the problem persists.

  1. Stamps export issue: Coregistration does not work with SNAP 8 but it does with SNAP 7, so I proceeded. Unfortunately the export has problems as well with both SNAP versions.
  • Using SNAP 8, the INSAR… folder was incomplete: the entire “dem” folder was missing as well as the .diff and .base files for each export within the “diff0” folder.
  • Then I tried with SNAP 7, the process starts but it is endless…

Can someone help me?

Thank you very much!

Try this below one. Maybe it will resolve your problem.

Does this work also with OpenSuse?