Sen2Cor does not generate AOT and WV jp2 images for any resolution


Hi, I’m new here. It’s been more than 24 hours now and Sen2Cor has been looping between 97% and 99% completion. Any ideas what could be wrong or what could be the fix?


I found this piece of code in in Line 3715 - 3727

        f = open(self._processingStatusFn, 'r')
        tTotal = float(f.readline()) * 0.01
        increment = tDelta.total_seconds() / self._tEstimation
        tTotal += increment
        if tTotal > 1.0:
            tWeighted = 100.0 - exp(-tTotal)
        elif tTotal > 0.98:
            tWeighted = tTotal * 100.0 - exp(-tTotal)
            tWeighted = tTotal * 100.0

        stdoutWrite('Progress[%%]: %03.2f : ' % tWeighted)
        stdoutWrite('PID-%d, %s, elapsed time[s]: %0.3f, total: %s\n' % (, procedure, tDelta.total_seconds(), tTotalDelta))

According to this, I think everytime the progress goes upward of 98%, it is reduced by the exponent of progress. Why is this being done?

Edit 2: I think I figured out that this loop is because of this statement:

Procedure: 20 m resolution must be processed first, elapsed time[s]: 1.864, total: 0:55:23.009842

This keeps the process in loop.

The code for this is derived from: (Line 177 ;

if not self.tables.checkAotMapIsPresent(20):
        self.config.timestamp('20 m resolution must be processed first')
        if not self.process_20():
            return False

What could this mean? And how can I fix it?

Edit 3: The cause of the error is that while processing ‘*AOT*.jp2’ and *WV*.jp2 is not created while processing any resolution and therefore the above function returns false every time. This is derived from this code:

def checkAotMapIsPresent(self, resolution):
    sourceDir = os.path.join(self._L2A_ImgDataDir, 'R' + str(resolution) + 'm')
        dirs = sorted(os.listdir(sourceDir))
        if self.config.namingConvention == 'SAFE_STANDARD':
            filemask = '*_AOT_L2A_*' + '.jp2'
            filemask = '*_AOT_???.jp2'

        for filename in dirs:
            if fnmatch.fnmatch(filename, filemask):
                return True
        return False
        return False

Edit 4:
Apparently it feels like L2A_AtmCorr does not get fired up to start processing of AOT and WV. Any clue why? Could it be because of import errors or dependency issues?

I’m only investigating and still have no clue about how to get out of this loop. The product I’m testing with is: S2A_MSIL1C_20181002T034551_N0206_R104_T47PMP_20181002T073417.SAFE


I have just downloaded your product and it seems to work properly with sen2cor version 2.5.5 on my side. I have tested with resolution=60 and with ALL resolutions.
What sen2cor version are you using?


The latest one. We’re using the tar.gz downloaded from We’re downloading external dependencies via pip or apt-get.


Could you try the standalone version that you can find here?