Error dealing with the workaround for sen2cor at resolution 10 m

Hi, guys! Thank you so much for the effort for improving the sen2cor to get Sentinel-2A L2A data! Currently, I am dealing with the sen2cor process and some problems occurred. The operating system of my PC is windows 7 professional edition 64 bit. I installed the Anaconda and SEN2COR according to the setup.pdf file, the sen2cor-sum-2.0.pdf file and some guys’ suggestion in step form, and it showed with success. Based on @ChristianSeverin’s workaround for sen2cor bug at resolution 10 m, I changed the L2A_Tables.py in C:\Users\tonychou\Anaconda2\Lib\site-packages\sen2cor-2.0.6-py2.7.egg\sen2cor with the uploaded one provided by @riyaadh91. I am confused that different from other guys’ errors, mine is that when processing a L1C images with all the granules, the 10 resolution L2A data could be achieved with the first granule, then it came to error when dealing with the second one. The detailed error content and screenshot were listed below, any help would be appreciated, thank you!
Progress[]: 0.05 : L2A_Tables: band B01 imported, elapsed time[s]: 8.572 Progress[]: 0.65 : L2A_Tables: band B02 imported, elapsed time[s]: 3.774
Progress[]: 0.91 : L2A_Tables: band B03 imported, elapsed time[s]: 3.810 Progress[]: 1.18 : L2A_Tables: band B04 imported, elapsed time[s]: 3.702
Progress[]: 1.44 : L2A_Tables: band B05 imported, elapsed time[s]: 3.161 Progress[]: 1.66 : L2A_Tables: band B06 imported, elapsed time[s]: 3.122
Progress[]: 1.88 : L2A_Tables: band B07 imported, elapsed time[s]: 3.129 Progress[]: 2.10 : L2A_Tables: band B8A imported, elapsed time[s]: 3.215
Progress[]: 2.32 : L2A_Tables: band B09 imported, elapsed time[s]: 8.017 Progress[]: 2.88 : L2A_Tables: band B10 imported, elapsed time[s]: 7.799
Progress[]: 3.43 : L2A_Tables: band B11 imported, elapsed time[s]: 3.056 Progress[]: 3.64 : L2A_Tables: band B12 imported, elapsed time[s]: 3.107
Progress[]: 3.86 : L2A_Tables: stop import, elapsed time[s]: 0.008 Progress[]: 3.86 : L2A_Process: start of Scene Classification, elapsed time[s]:
0.002
Progress[]: 3.86 : Pre process , elapsed time[s]: 1.008 Progress[]: 3.93 : L2A_SC init , elapsed time[s]: 0.851
Progress[]: 3.99 : L2A_CSND_1_1 , elapsed time[s]: 1.829 Progress[]: 4.12 : L2A_CSND_1_2 , elapsed time[s]: 2.293
Progress[]: 4.28 : L2A_CSND_2_0 , elapsed time[s]: 0.254 Progress[]: 4.30 : L2A_CSND_2_1 , elapsed time[s]: 1.862
Progress[]: 4.43 : L2A_CSND_2_2 , elapsed time[s]: 0.985 Progress[]: 4.50 : L2A_CSND_2_3 , elapsed time[s]: 1.011
Progress[]: 4.57 : L2A_CSND_2_4 , elapsed time[s]: 1.655 Progress[]: 4.69 : L2A_CSND_2_5 , elapsed time[s]: 0.768
Progress[]: 4.74 : L2A_CSND_3 , elapsed time[s]: 3.024 Progress[]: 4.95 : L2A_CSND_4 , elapsed time[s]: 2.285
Progress[]: 5.11 : L2A_CSHD_5_1 , elapsed time[s]: 2.759 Progress[]: 5.30 : L2A_CSND_5_2 , elapsed time[s]: 3.483
Progress[]: 5.55 : L2A_CSND_6 , elapsed time[s]: 1.965 Progress[]: 5.69 : L2A_CSND_7 , elapsed time[s]: 1.974
Progress[]: 5.82 : L2A_SHD , elapsed time[s]: 29.252 Progress[]: 7.87 : Soil recovery, elapsed time[s]: 1.056
Progress[]: 7.95 : DV recovery , elapsed time[s]: 2.265 Progress[]: 8.10 : WP recovery , elapsed time[s]: 1.159
Progress[]: 8.19 : Post process , elapsed time[s]: 4.392 Progress[]: 8.49 : L2A_Process: start of Atmospheric Correction, elapsed time[s ]: 0.003
Progress[]: 8.49 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.05 4 Progress[]: 8.50 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[s ]: 3.048
Progress[]: 8.71 : L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s ]: 0.004 Progress[]: 8.71 : L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]:
1.085
Progress[]: 8.79 : L2A_AtmCorr: end of internal classification, elapsed time[s] : 14.637 Progress[]: 9.81 : L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 0.9
80
Progress[]: 9.88 : L2A_AtmCorr: end retreiving reference pixels for dark areas, elapsed time[s]: 11.621 Progress[]: 10.69 : L2A_AtmCorr: end of check for negative reflectance pixels,
elapsed time[s]: 52.042
Progress[]: 14.34 : L2A_AtmCorr: end of visibility index calculation, elapsed t ime[s]: 13.025 Progress[]: 15.25 : L2A_AtmCorr: start of WV retrieval, elapsed time[s]: 0.002
Progress[]: 15.25 : L2A_AtmCorr: end of WV retrieval preparation, elapsed time[ s]: 4.977 Progress[]: 15.60 : L2A_AtmCorr: end of WV retrieval, elapsed time[s]: 181.792
Progress[%]: 28.33 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 0.003

Progress[]: 28.33 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time [s]: 7.226 Progress[]: 28.83 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]:
99.514
Progress[]: 35.80 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 53.365 Progress[]: 39.54 : L2A_Process: start of post processing, elapsed time[s]: 0.0
69
Progress[]: 39.54 : L2A_Tables: start export, elapsed time[s]: 0.003 Progress[]: 39.54 : L2A_Tables: band B02 exported, elapsed time[s]: 4.999
Progress[]: 39.89 : L2A_Tables: band B03 exported, elapsed time[s]: 5.025 Progress[]: 40.24 : L2A_Tables: band B04 exported, elapsed time[s]: 5.115
Progress[]: 40.60 : L2A_Tables: band B05 exported, elapsed time[s]: 4.985 Progress[]: 40.95 : L2A_Tables: band B06 exported, elapsed time[s]: 4.865
Progress[]: 41.29 : L2A_Tables: band B07 exported, elapsed time[s]: 4.965 Progress[]: 41.64 : L2A_Tables: band B8A exported, elapsed time[s]: 4.959
Progress[]: 41.99 : L2A_Tables: band B11 exported, elapsed time[s]: 4.990 Progress[]: 42.34 : L2A_Tables: band B12 exported, elapsed time[s]: 5.042
Progress[]: 42.69 : L2A_Tables: band SCL exported, elapsed time[s]: 3.415 Progress[]: 42.93 : L2A_Tables: band SNW exported, elapsed time[s]: 3.238
Progress[]: 43.15 : L2A_Tables: band CLD exported, elapsed time[s]: 3.730 Progress[]: 43.42 : L2A_Tables: band AOT exported, elapsed time[s]: 3.240
Progress[]: 43.64 : L2A_Tables: band WVP exported, elapsed time[s]: 4.355 Progress[]: 43.95 : L2A_Tables: band VIS exported, elapsed time[s]: 3.185
Progress[]: 44.17 : L2A_Tables: stop export, elapsed time[s]: 0.077 Progress[]: 44.18 : Trying to copy
“C:\Users\tonychou\documents\sen2cor/cfg/L2A_GIPP.xml” to
“E:/S2A_USER_PRD_MSIL2A_PDMC_20160412T132428_R032_V20160410T030629_20160410T030
629/GRANULE/S2A_USER_MSI_L2A_TL_MTI__20160410T082405_A004176_T50SLH_N02.01/AUX_D
ATA\S2A_USER_GIP_L2A_TL_MTI__20160410T082405_A004176_T50SLH.xml”
…, but target already exists!
Validating metadata file S2A_USER_MTD_SAFL2A_PDMC_20160412T132428_R032_V20160410
T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Process: processing with resolution 10 m, elapsed time[s]: 0.503
Progress[]: 44.21 : L2A_Process: start of pre processing, elapsed time[s]: 0.00 3 Progress[]: 44.21 : Validating metadata file S2A_OPER_MTD_SAFL1C_PDMC_20160412T
132428_R032_V20160410T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is valid.
Validating metadata file S2A_OPER_MTD_L1C_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Tables: start import, elapsed time[s]: 0.737
Progress[]: 0.05 : L2A_Tables: band B02 imported, elapsed time[s]: 17.206 Progress[]: 1.26 : L2A_Tables: band B03 imported, elapsed time[s]: 17.620
Progress[]: 2.49 : L2A_Tables: band B04 imported, elapsed time[s]: 17.907 Progress[]: 3.74 : L2A_Tables: band B08 imported, elapsed time[s]: 17.724
Progress[]: 4.98 : L2A_Tables: band AOT imported, elapsed time[s]: 26.176 Progress[]: 6.82 : L2A_Tables: band WVP imported, elapsed time[s]: 27.497
Progress[]: 8.74 : L2A_Tables: band VIS imported, elapsed time[s]: 26.577 Progress[]: 10.60 : L2A_Tables: band SCL imported, elapsed time[s]: 26.638
Progress[]: 12.47 : L2A_Tables: stop import, elapsed time[s]: 0.010 Progress[]: 12.47 : L2A_Process: start of Atmospheric Correction, elapsed time[
s]: 0.003
Progress[]: 12.47 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.0 49 Progress[]: 12.47 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[
s]: 12.234
Progress[]: 13.33 : L2A_AtmCorr: start of resampling visibility for 10 m resolu tion, elapsed time[s]: 0.003 Progress[]: 13.33 : L2A_AtmCorr: end of resampling visibility for 10 m resoluti
on, elapsed time[s]: 2.140
Progress[%]: 13.48 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 3.006

Progress[]: 13.69 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time [s]: 5.059 Progress[]: 14.04 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]:
265.816
Progress[]: 32.66 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 100.833 Progress[]: 39.72 : L2A_Process: start of post processing, elapsed time[s]: 0.1
45
Progress[]: 39.73 : L2A_Tables: start export, elapsed time[s]: 0.092 Progress[]: 39.73 : L2A_Tables: band B02 exported, elapsed time[s]: 20.973
Progress[]: 41.20 : L2A_Tables: band B03 exported, elapsed time[s]: 20.834 Progress[]: 42.66 : L2A_Tables: band B04 exported, elapsed time[s]: 20.923
Progress[]: 44.12 : L2A_Tables: band B08 exported, elapsed time[s]: 21.092 Progress[]: 45.60 : L2A_Tables: band AOT exported, elapsed time[s]: 14.163
Progress[]: 46.59 : L2A_Tables: band WVP exported, elapsed time[s]: 16.442 Progress[]: 47.74 : L2A_Tables: stop export, elapsed time[s]: 0.090
Progress[]: 47.75 : Skipped auto-referential copy of "E:\/S2A_USER_PRD_MSIL2A_P DMC_20160412T132428_R032_V20160410T030629_20160410T030629/GRANULE/S2A_USER_MSI_L 2A_TL_MTI__20160410T082405_A004176_T50SLH_N02.01/AUX_DATA\S2A_USER_GIP_L2A_TL_MT I__20160410T082405_A004176_T50SLH.xml" Validating metadata file S2A_USER_MTD_SAFL2A_PDMC_20160412T132428_R032_V20160410 T030629_20160410T030629.xml against scheme ... Metadata file is invalid, see logfile for details. Validating metadata file S2A_USER_MTD_L2A_TL_MTI__20160410T082405_A004176_T50SLH .xml against scheme ... Metadata file is invalid, see logfile for details. Validating metadata file S2A_USER_MTD_L2A_DS_MTI__20160410T082405_S20160410T0306 29.xml against scheme ... Metadata file is valid. check if 20m table exists ... check if 60m table exists... Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SMH .xml against scheme ... Metadata file is valid. L2A_Process: processing with resolution 60 m, elapsed time[s]: 1.028 Progress[]: 47.82 : L2A_Process: start of pre processing, elapsed time[s]: 0.00
2
Progress[]: 47.82 : Validating metadata file S2A_OPER_MTD_SAFL1C_PDMC_20160412T 132428_R032_V20160410T030629_20160410T030629.xml against scheme ... Metadata file is invalid, see logfile for details. Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SMH .xml against scheme ... Metadata file is valid. Validating metadata file S2A_OPER_MTD_L1C_DS_MTI__20160410T082405_S20160410T0306 29.xml against scheme ... Metadata file is valid. L2A_Tables: start import, elapsed time[s]: 0.941 Progress[]: 0.07 : L2A_Tables: band B01 imported, elapsed time[s]: 1.295
Progress[]: 0.16 : L2A_Tables: band B02 imported, elapsed time[s]: 9.871 Progress[]: 0.85 : L2A_Tables: band B03 imported, elapsed time[s]: 10.209
Progress[]: 1.58 : L2A_Tables: band B04 imported, elapsed time[s]: 10.969 Progress[]: 2.35 : L2A_Tables: band B05 imported, elapsed time[s]: 3.277
Progress[]: 2.58 : L2A_Tables: band B06 imported, elapsed time[s]: 3.213 Progress[]: 2.81 : L2A_Tables: band B07 imported, elapsed time[s]: 3.310
Progress[]: 3.04 : L2A_Tables: band B8A imported, elapsed time[s]: 3.347 Progress[]: 3.28 : L2A_Tables: band B09 imported, elapsed time[s]: 1.306
Progress[]: 3.37 : L2A_Tables: band B10 imported, elapsed time[s]: 0.755 Progress[]: 3.42 : L2A_Tables: band B11 imported, elapsed time[s]: 3.372
Progress[]: 3.66 : L2A_Tables: band B12 imported, elapsed time[s]: 3.400 Progress[]: 3.90 : L2A_Tables: stop import, elapsed time[s]: 0.005
Progress[]: 3.90 : L2A_Process: start of Scene Classification, elapsed time[s]: 0.001 Progress[]: 3.90 : Pre process , elapsed time[s]: 0.254
Progress[]: 3.92 : L2A_SC init , elapsed time[s]: 0.136 Progress[]: 3.93 : L2A_CSND_1_1 , elapsed time[s]: 0.241
Progress[]: 3.95 : L2A_CSND_1_2 , elapsed time[s]: 0.298 Progress[]: 3.97 : L2A_CSND_2_0 , elapsed time[s]: 0.209
Progress[]: 3.98 : L2A_CSND_2_1 , elapsed time[s]: 0.237 Progress[]: 4.00 : L2A_CSND_2_2 , elapsed time[s]: 0.133
Progress[]: 4.01 : L2A_CSND_2_3 , elapsed time[s]: 0.129 Progress[]: 4.02 : L2A_CSND_2_4 , elapsed time[s]: 0.228
Progress[]: 4.03 : L2A_CSND_2_5 , elapsed time[s]: 0.127 Progress[]: 4.04 : L2A_CSND_3 , elapsed time[s]: 0.441
Progress[]: 4.07 : L2A_CSND_4 , elapsed time[s]: 0.394 Progress[]: 4.10 : L2A_CSHD_5_1 , elapsed time[s]: 0.376
Progress[]: 4.13 : L2A_CSND_5_2 , elapsed time[s]: 0.467 Progress[]: 4.16 : L2A_CSND_6 , elapsed time[s]: 0.280
Progress[]: 4.18 : L2A_CSND_7 , elapsed time[s]: 0.286 Progress[]: 4.20 : L2A_SHD , elapsed time[s]: 3.996
Progress[]: 4.48 : Soil recovery, elapsed time[s]: 0.167 Progress[]: 4.50 : DV recovery , elapsed time[s]: 0.326
Progress[]: 4.52 : WP recovery , elapsed time[s]: 0.180 Progress[]: 4.53 : Post process , elapsed time[s]: 0.827
Progress[]: 4.59 : L2A_Process: start of Atmospheric Correction, elapsed time[s ]: 0.001 Progress[]: 4.59 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.05
1
Progress[]: 4.59 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[s ]: 0.364 Progress[]: 4.62 : L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s ]: 0.002
Progress[]: 4.62 : L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]: 1.061 Progress[]: 4.69 : L2A_AtmCorr: end of internal classification, elapsed time[s]
: 1.809
Progress[]: 4.82 : L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 0.9 04 Progress[]: 4.89 : L2A_AtmCorr: end retreiving reference pixels for dark areas,
elapsed time[s]: 0.002
Progress[]: 4.89 : L2A_AtmCorr: end of check for dense bright vegetation pixels , elapsed time[s]: 3.897 Progress[]: 5.16 : L2A_AtmCorr: end of receiving atmospheric functions for all
altitudes and visibilities, elapsed time[s]: 1.514
Progress[]: 5.27 : L2A_AtmCorr: start of WV retrieval, elapsed time[s]: 0.002 Progress[]: 5.27 : L2A_AtmCorr: end of WV retrieval preparation, elapsed time[s ]: 1.357
Progress[]: 5.36 : L2A_AtmCorr: end of WV retrieval, elapsed time[s]: 28.942 Progress[]: 7.41 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 0.002
Progress[]: 7.41 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time[ s]: 6.327 Progress[]: 7.85 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]: 2
5.408
Progress[]: 9.65 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 7 .917 Progress[]: 10.21 : L2A_Process: start of post processing, elapsed time[s]: 0.0
19
Progress[]: 10.21 : L2A_Tables: start export, elapsed time[s]: 0.003 Progress[]: 10.21 : L2A_Tables: band B01 exported, elapsed time[s]: 1.511
Progress[]: 10.32 : L2A_Tables: band B02 exported, elapsed time[s]: 1.643 Progress[]: 10.43 : L2A_Tables: band B03 exported, elapsed time[s]: 1.664
Progress[]: 10.55 : L2A_Tables: band B04 exported, elapsed time[s]: 1.735 Progress[]: 10.67 : L2A_Tables: band B05 exported, elapsed time[s]: 1.686
Progress[]: 10.79 : L2A_Tables: band B06 exported, elapsed time[s]: 1.707 Progress[]: 10.91 : L2A_Tables: band B07 exported, elapsed time[s]: 1.725
Progress[]: 11.03 : L2A_Tables: band B8A exported, elapsed time[s]: 1.724 Progress[]: 11.15 : L2A_Tables: band B09 exported, elapsed time[s]: 1.654
Progress[]: 11.27 : L2A_Tables: band B11 exported, elapsed time[s]: 1.729 Progress[]: 11.39 : L2A_Tables: band B12 exported, elapsed time[s]: 1.743
Progress[]: 11.52 : L2A_Tables: band SCL exported, elapsed time[s]: 0.394 Progress[]: 11.54 : L2A_Tables: band SNW exported, elapsed time[s]: 0.170
Progress[]: 11.56 : L2A_Tables: band CLD exported, elapsed time[s]: 0.811 Progress[]: 11.61 : L2A_Tables: band AOT exported, elapsed time[s]: 0.190
Progress[]: 11.63 : L2A_Tables: band WVP exported, elapsed time[s]: 1.211 Progress[]: 11.71 : L2A_Tables: band VIS exported, elapsed time[s]: 0.190
Progress[%]: 11.73 : Traceback (most recent call last):
File “C:\Users\tonychou\Anaconda2\Scripts\L2A_Process-script.py”, line 9, in <
module>
load_entry_point(‘sen2cor==2.0.6’, ‘console_scripts’, ‘L2A_Process’)()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 283, in main
result = processor.selectAndProcess(tile)
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 83, in selectAndProcess
self.selectAndProcess(tile)
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 101, in selectAndProcess
self.selectAndProcess(tile)
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 117, in selectAndProcess
self._processed60 = self.process()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 152, in process
if(self.postprocess() == False):
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 189, in postprocess
res = self.tables.exportBandList()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Tables.py”, line 1237, in exportBandList
if bl[i].text == ‘B8’:
File “lxml.objectify.pyx”, line 307, in lxml.objectify.ObjectifiedElement.ge
titem
(src\lxml\lxml.objectify.c:4697)
IndexError: 11

C:\Users\tonychou>

I am also getting IndexError: 11 when L2A_Process at 10m resolution on S2A_USER_PRD_MSIL2A_PDMC_20160420T195930_R037_V20160420T112242_20160420T112242.SAFE

I have not implemented any previous “workaround” and Sen2Cor works correctly on other scenes I have tired. It also runs correctly at 20m on the above product. I notice that your product date is also fairly new, maybe something has changed recently?

HI, Anthony
Thanks for your reply! I have tried the original L2A_Tables.py that did not involve with the “workaround” with L1C product at 10m resolution. It was ok when dealing with the first granule, however, error occurred when handling the second one. Also, I have had another try with 20m resolution with the oriental L2A_Tables.py, it runs successfully with the whole granules. Really don’t know why. Here is error content and screenshot.

Progress[]: 0.16 : L2A_Process: start of pre processing, elapsed time[s]: 0.007 Progress[]: 0.16 : Validating metadata file S2A_OPER_MTD_SAFL1C_PDMC_20160412T1
32428_R032_V20160410T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is valid.
Validating metadata file S2A_OPER_MTD_L1C_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Tables: start import, elapsed time[s]: 0.722
Progress[]: 0.05 : L2A_Tables: band B01 imported, elapsed time[s]: 0.555 Progress[]: 0.09 : L2A_Tables: band B02 imported, elapsed time[s]: 3.284
Progress[]: 0.31 : L2A_Tables: band B03 imported, elapsed time[s]: 3.205 Progress[]: 0.52 : L2A_Tables: band B04 imported, elapsed time[s]: 3.406
Progress[]: 0.75 : L2A_Tables: band B05 imported, elapsed time[s]: 0.912 Progress[]: 0.81 : L2A_Tables: band B06 imported, elapsed time[s]: 0.909
Progress[]: 0.88 : L2A_Tables: band B07 imported, elapsed time[s]: 0.918 Progress[]: 0.94 : L2A_Tables: band B8A imported, elapsed time[s]: 0.922
Progress[]: 1.00 : L2A_Tables: band B09 imported, elapsed time[s]: 0.402 Progress[]: 1.03 : L2A_Tables: band B10 imported, elapsed time[s]: 0.283
Progress[]: 1.05 : L2A_Tables: band B11 imported, elapsed time[s]: 0.903 Progress[]: 1.11 : L2A_Tables: band B12 imported, elapsed time[s]: 0.935
Progress[]: 1.17 : L2A_Tables: stop import, elapsed time[s]: 0.006 Progress[]: 1.17 : L2A_Process: start of Scene Classification, elapsed time[s]:
0.004
Progress[]: 1.17 : Pre process , elapsed time[s]: 0.165 Progress[]: 1.18 : L2A_SC init , elapsed time[s]: 0.110
Progress[]: 1.19 : L2A_CSND_1_1 , elapsed time[s]: 0.232 Progress[]: 1.20 : L2A_CSND_1_2 , elapsed time[s]: 0.275
Progress[]: 1.22 : L2A_CSND_2_0 , elapsed time[s]: 1.077 Progress[]: 1.30 : L2A_CSND_2_1 , elapsed time[s]: 0.225
Progress[]: 1.31 : L2A_CSND_2_2 , elapsed time[s]: 0.119 Progress[]: 1.32 : L2A_CSND_2_3 , elapsed time[s]: 0.121
Progress[]: 1.33 : L2A_CSND_2_4 , elapsed time[s]: 0.197 Progress[]: 1.34 : L2A_CSND_2_5 , elapsed time[s]: 0.097
Progress[]: 1.35 : L2A_CSND_3 , elapsed time[s]: 0.349 Progress[]: 1.37 : L2A_CSND_4 , elapsed time[s]: 0.275
Progress[]: 1.39 : L2A_CSHD_5_1 , elapsed time[s]: 0.354 Progress[]: 1.41 : L2A_CSND_5_2 , elapsed time[s]: 0.424
Progress[]: 1.44 : L2A_CSND_6 , elapsed time[s]: 0.251 Progress[]: 1.46 : L2A_CSND_7 , elapsed time[s]: 0.277
Progress[]: 1.48 : L2A_SHD , elapsed time[s]: 3.392 Progress[]: 1.70 : Soil recovery, elapsed time[s]: 0.144
Progress[]: 1.71 : DV recovery , elapsed time[s]: 0.295 Progress[]: 1.73 : WP recovery , elapsed time[s]: 0.147
Progress[]: 1.74 : Post process , elapsed time[s]: 0.620 Progress[]: 1.79 : L2A_Process: start of Atmospheric Correction, elapsed time[s ]: 0.004
Progress[]: 1.79 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.10 2 Progress[]: 1.79 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[s ]: 0.364
Progress[]: 1.82 : L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s ]: 0.003 Progress[]: 1.82 : L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]:
1.099
Progress[]: 1.89 : L2A_AtmCorr: end of internal classification, elapsed time[s] : 1.697 Progress[]: 2.01 : L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 0.9
72
Progress[]: 2.07 : L2A_AtmCorr: end retreiving reference pixels for dark areas, elapsed time[s]: 1.760 Progress[]: 2.19 : L2A_AtmCorr: end of check for negative reflectance pixels, e
lapsed time[s]: 6.059
Progress[]: 2.60 : L2A_AtmCorr: end of visibility index calculation, elapsed ti me[s]: 2.405 Progress[]: 2.76 : L2A_AtmCorr: start of WV retrieval, elapsed time[s]: 0.003
Progress[]: 2.76 : L2A_AtmCorr: end of WV retrieval preparation, elapsed time[s ]: 1.446 Progress[]: 2.86 : L2A_AtmCorr: end of WV retrieval, elapsed time[s]: 25.067
Progress[]: 4.55 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 0.002 Progress[]: 4.55 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time[
s]: 6.751
Progress[]: 5.00 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]: 1 5.610 Progress[]: 6.05 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 6
.315
Progress[]: 6.48 : L2A_Process: start of post processing, elapsed time[s]: 0.03 9 Progress[]: 6.48 : L2A_Tables: start export, elapsed time[s]: 0.005
Progress[]: 6.48 : L2A_Tables: band B01 exported, elapsed time[s]: 0.417 Progress[]: 6.51 : L2A_Tables: band B02 exported, elapsed time[s]: 0.423
Progress[]: 6.54 : L2A_Tables: band B03 exported, elapsed time[s]: 0.463 Progress[]: 6.57 : L2A_Tables: band B04 exported, elapsed time[s]: 0.439
Progress[]: 6.60 : L2A_Tables: band B05 exported, elapsed time[s]: 0.445 Progress[]: 6.63 : L2A_Tables: band B06 exported, elapsed time[s]: 0.438
Progress[]: 6.66 : L2A_Tables: band B07 exported, elapsed time[s]: 0.446 Progress[]: 6.69 : L2A_Tables: band B8A exported, elapsed time[s]: 0.446
Progress[]: 6.72 : L2A_Tables: band B09 exported, elapsed time[s]: 0.417 Progress[]: 6.75 : L2A_Tables: band B11 exported, elapsed time[s]: 0.460
Progress[]: 6.78 : L2A_Tables: band B12 exported, elapsed time[s]: 0.436 Progress[]: 6.81 : L2A_Tables: band SCL exported, elapsed time[s]: 0.227
Progress[]: 6.82 : L2A_Tables: band SNW exported, elapsed time[s]: 0.190 Progress[]: 6.83 : L2A_Tables: band CLD exported, elapsed time[s]: 0.314
Progress[]: 6.86 : L2A_Tables: band AOT exported, elapsed time[s]: 0.223 Progress[]: 6.87 : L2A_Tables: band WVP exported, elapsed time[s]: 0.371
Progress[]: 6.90 : L2A_Tables: band VIS exported, elapsed time[s]: 0.218 Progress[]: 6.91 : L2A_Tables: preview image exported, elapsed time[s]: 0.230
Progress[]: 6.93 : L2A_Tables: stop export, elapsed time[s]: 0.035 Progress[]: 6.93 : Validating metadata file S2A_USER_MTD_SAFL2A_PDMC_20160412T1
32428_R032_V20160410T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Process: processing with resolution 20 m, elapsed time[s]: 0.535
Progress[%]: 6.96 : L2A_Process: start of pre processing, elapsed time[s]: 0.003

Progress[]: 6.96 : Validating metadata file S2A_OPER_MTD_SAFL1C_PDMC_20160412T1 32428_R032_V20160410T030629_20160410T030629.xml against scheme ... Metadata file is invalid, see logfile for details. Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SLH .xml against scheme ... Metadata file is valid. Validating metadata file S2A_OPER_MTD_L1C_DS_MTI__20160410T082405_S20160410T0306 29.xml against scheme ... Metadata file is valid. L2A_Tables: start import, elapsed time[s]: 0.641 Progress[]: 0.04 : L2A_Tables: band B01 imported, elapsed time[s]: 7.780
Progress[]: 0.57 : L2A_Tables: band B02 imported, elapsed time[s]: 3.517 Progress[]: 0.80 : L2A_Tables: band B03 imported, elapsed time[s]: 3.464
Progress[]: 1.04 : L2A_Tables: band B04 imported, elapsed time[s]: 3.666 Progress[]: 1.28 : L2A_Tables: band B05 imported, elapsed time[s]: 3.134
Progress[]: 1.50 : L2A_Tables: band B06 imported, elapsed time[s]: 3.011 Progress[]: 1.70 : L2A_Tables: band B07 imported, elapsed time[s]: 3.109
Progress[]: 1.91 : L2A_Tables: band B8A imported, elapsed time[s]: 3.128 Progress[]: 2.12 : L2A_Tables: band B09 imported, elapsed time[s]: 8.025
Progress[]: 2.66 : L2A_Tables: band B10 imported, elapsed time[s]: 7.720 Progress[]: 3.18 : L2A_Tables: band B11 imported, elapsed time[s]: 3.130
Progress[]: 3.39 : L2A_Tables: band B12 imported, elapsed time[s]: 3.080 Progress[]: 3.60 : L2A_Tables: stop import, elapsed time[s]: 0.006
Progress[]: 3.60 : L2A_Process: start of Scene Classification, elapsed time[s]: 0.002 Progress[]: 3.60 : Pre process , elapsed time[s]: 1.013
Progress[]: 3.67 : L2A_SC init , elapsed time[s]: 0.826 Progress[]: 3.72 : L2A_CSND_1_1 , elapsed time[s]: 1.757
Progress[]: 3.84 : L2A_CSND_1_2 , elapsed time[s]: 2.149 Progress[]: 3.98 : L2A_CSND_2_0 , elapsed time[s]: 0.222
Progress[]: 4.00 : L2A_CSND_2_1 , elapsed time[s]: 1.741 Progress[]: 4.12 : L2A_CSND_2_2 , elapsed time[s]: 0.933
Progress[]: 4.18 : L2A_CSND_2_3 , elapsed time[s]: 0.929 Progress[]: 4.24 : L2A_CSND_2_4 , elapsed time[s]: 1.564
Progress[]: 4.35 : L2A_CSND_2_5 , elapsed time[s]: 0.717 Progress[]: 4.40 : L2A_CSND_3 , elapsed time[s]: 2.877
Progress[]: 4.59 : L2A_CSND_4 , elapsed time[s]: 2.243 Progress[]: 4.74 : L2A_CSHD_5_1 , elapsed time[s]: 2.787
Progress[]: 4.93 : L2A_CSND_5_2 , elapsed time[s]: 3.407 Progress[]: 5.16 : L2A_CSND_6 , elapsed time[s]: 1.984
Progress[]: 5.29 : L2A_CSND_7 , elapsed time[s]: 2.015 Progress[]: 5.43 : L2A_SHD , elapsed time[s]: 29.668
Progress[]: 7.43 : Soil recovery, elapsed time[s]: 1.100 Progress[]: 7.50 : DV recovery , elapsed time[s]: 2.260
Progress[]: 7.65 : WP recovery , elapsed time[s]: 1.194 Progress[]: 7.73 : Post process , elapsed time[s]: 4.296
Progress[]: 8.02 : L2A_Process: start of Atmospheric Correction, elapsed time[s ]: 0.003 Progress[]: 8.02 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.04
8
Progress[]: 8.03 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[s ]: 3.099 Progress[]: 8.23 : L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s ]: 0.004
Progress[]: 8.23 : L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]: 1.132 Progress[]: 8.31 : L2A_AtmCorr: end of internal classification, elapsed time[s]
: 14.568
Progress[]: 9.29 : L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 1.0 13 Progress[]: 9.36 : L2A_AtmCorr: end retreiving reference pixels for dark areas,
elapsed time[s]: 10.772
Progress[]: 10.09 : L2A_AtmCorr: end of check for negative reflectance pixels, elapsed time[s]: 51.458 Progress[]: 13.55 : L2A_AtmCorr: end of visibility index calculation, elapsed t
ime[s]: 13.323
Progress[]: 14.45 : L2A_AtmCorr: start of WV retrieval, elapsed time[s]: 0.003 Progress[]: 14.45 : L2A_AtmCorr: end of WV retrieval preparation, elapsed time[
s]: 5.234
Progress[]: 14.80 : L2A_AtmCorr: end of WV retrieval, elapsed time[s]: 191.942 Progress[]: 27.73 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 0.004

Progress[]: 27.73 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time [s]: 7.503 Progress[]: 28.24 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]:
104.149
Progress[]: 35.25 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 57.469 Progress[]: 39.12 : L2A_Process: start of post processing, elapsed time[s]: 0.0
70
Progress[]: 39.13 : L2A_Tables: start export, elapsed time[s]: 0.004 Progress[]: 39.13 : L2A_Tables: band B02 exported, elapsed time[s]: 5.240
Progress[]: 39.48 : L2A_Tables: band B03 exported, elapsed time[s]: 5.283 Progress[]: 39.84 : L2A_Tables: band B04 exported, elapsed time[s]: 5.405
Progress[]: 40.20 : L2A_Tables: band B05 exported, elapsed time[s]: 5.252 Progress[]: 40.56 : L2A_Tables: band B06 exported, elapsed time[s]: 5.130
Progress[]: 40.90 : L2A_Tables: band B07 exported, elapsed time[s]: 5.269 Progress[]: 41.26 : L2A_Tables: band B8A exported, elapsed time[s]: 5.306
Progress[]: 41.61 : L2A_Tables: band B11 exported, elapsed time[s]: 5.255 Progress[]: 41.97 : L2A_Tables: band B12 exported, elapsed time[s]: 5.137
Progress[]: 42.31 : L2A_Tables: band SCL exported, elapsed time[s]: 3.509 Progress[]: 42.55 : L2A_Tables: band SNW exported, elapsed time[s]: 3.260
Progress[]: 42.77 : L2A_Tables: band CLD exported, elapsed time[s]: 3.884 Progress[]: 43.03 : L2A_Tables: band AOT exported, elapsed time[s]: 3.352
Progress[]: 43.26 : L2A_Tables: band WVP exported, elapsed time[s]: 4.442 Progress[]: 43.56 : L2A_Tables: band VIS exported, elapsed time[s]: 3.244
Progress[]: 43.78 : L2A_Tables: stop export, elapsed time[s]: 0.077 Progress[]: 43.78 : Validating metadata file S2A_USER_MTD_SAFL2A_PDMC_20160412T
132428_R032_V20160410T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_USER_MTD_L2A_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Process: processing with resolution 10 m, elapsed time[s]: 0.532
Progress[]: 43.82 : L2A_Process: start of pre processing, elapsed time[s]: 0.00 2 Progress[]: 43.82 : Validating metadata file S2A_OPER_MTD_SAFL1C_PDMC_20160412T
132428_R032_V20160410T030629_20160410T030629.xml against scheme …
Metadata file is invalid, see logfile for details.
Validating metadata file S2A_OPER_MTD_L1C_TL_MTI__20160410T082405_A004176_T50SLH
.xml against scheme …
Metadata file is valid.
Validating metadata file S2A_OPER_MTD_L1C_DS_MTI__20160410T082405_S20160410T0306
29.xml against scheme …
Metadata file is valid.
L2A_Tables: start import, elapsed time[s]: 0.760
Progress[]: 0.05 : L2A_Tables: band B02 imported, elapsed time[s]: 17.513 Progress[]: 1.23 : L2A_Tables: band B03 imported, elapsed time[s]: 18.037
Progress[]: 2.45 : L2A_Tables: band B04 imported, elapsed time[s]: 19.106 Progress[]: 3.73 : L2A_Tables: band B08 imported, elapsed time[s]: 20.137
Progress[]: 5.09 : L2A_Tables: band AOT imported, elapsed time[s]: 28.624 Progress[]: 7.02 : L2A_Tables: band WVP imported, elapsed time[s]: 30.750
Progress[]: 9.09 : L2A_Tables: band VIS imported, elapsed time[s]: 28.902 Progress[]: 11.04 : L2A_Tables: band SCL imported, elapsed time[s]: 28.290
Progress[]: 12.94 : L2A_Tables: stop import, elapsed time[s]: 0.008 Progress[]: 12.94 : L2A_Process: start of Atmospheric Correction, elapsed time[
s]: 0.005
Progress[]: 12.94 : L2A_AtmCorr: starting data processing, elapsed time[s]: 0.0 59 Progress[]: 12.95 : L2A_AtmCorr: end of calculation terrain maps, elapsed time[
s]: 13.286
Progress[]: 13.84 : L2A_AtmCorr: start of resampling visibility for 10 m resolu tion, elapsed time[s]: 0.003 Progress[]: 13.84 : L2A_AtmCorr: end of resampling visibility for 10 m resoluti
on, elapsed time[s]: 2.255
Progress[%]: 13.99 : L2A_AtmCorr: start of rho retrieval, elapsed time[s]: 3.104

Progress[]: 14.20 : L2A_AtmCorr: end of rho retrieval preparation, elapsed time [s]: 5.458 Progress[]: 14.57 : L2A_AtmCorr: end of rho retrieval step 1, elapsed time[s]:
286.615
Progress[]: 33.88 : L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 106.905 Progress[]: 41.08 : L2A_Process: start of post processing, elapsed time[s]: 0.1
54
Progress[]: 41.09 : L2A_Tables: start export, elapsed time[s]: 0.012 Progress[]: 41.09 : L2A_Tables: band B02 exported, elapsed time[s]: 22.061
Progress[]: 42.58 : L2A_Tables: band B03 exported, elapsed time[s]: 21.319 Progress[]: 44.01 : L2A_Tables: band B04 exported, elapsed time[s]: 21.296
Progress[]: 45.45 : L2A_Tables: band B08 exported, elapsed time[s]: 21.194 Progress[]: 46.87 : L2A_Tables: band AOT exported, elapsed time[s]: 14.210
Progress[]: 47.83 : L2A_Tables: band WVP exported, elapsed time[s]: 16.435 Progress[]: 48.94 : L2A_Tables: stop export, elapsed time[s]: 0.086
Progress[%]: 48.94 : Traceback (most recent call last):
File “C:\Users\tonychou\Anaconda2\Scripts\L2A_Process-script.py”, line 9, in <
module>
load_entry_point(‘sen2cor==2.0.6’, ‘console_scripts’, ‘L2A_Process’)()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 283, in main
result = processor.selectAndProcess(tile)
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 89, in selectAndProcess
self._processed10 = self.process()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 152, in process
if(self.postprocess() == False):
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Process.py”, line 190, in postprocess
self.tables.postprocess()
File “C:\Users\tonychou\Anaconda2\lib\site-packages\sen2cor-2.0.6-py2.7.egg\se
n2cor\L2A_Tables.py”, line 1385, in postprocess
copy_file(self.config.configFn, target)
File “C:\Users\tonychou\Anaconda2\lib\distutils\file_util.py”, line 156, in co
py_file
copy_file_contents(src, dst)
File “C:\Users\tonychou\Anaconda2\lib\distutils\file_util.py”, line 41, in co
py_file_contents
"could not delete ‘%s’: s" (dst, errstr))
distutils.errors.DistutilsFileError: could not delete 'E:/S2A_USER_PRD_MSIL2A_P
DMC_20160412T132428_R032_V20160410T030629_20160410T030629.SAFE/GRANULE/S2A_USER

MSI_L2A_TL_MTI__20160410T082405_A004176_T50SLH_N02.01/AUX_DATA\S2A_USER_GIP_L2A

TL_MTI__20160410T082405_A004176_T50SLH.xml’:

C:\Users\tonychou>

I also met this problem in new dataset. I have successfully processed the data before march with 10m resolution. but this time not. I will try some 20m again. if you have some methods, let me know. Thank you!

I will test my product with the new Sen2Cor 2.2.1, and let you know the results.

However, when trying to copy the dataset between computers, it encountered an “Invalid Argument” error when attempting to copy “S2A_OPER_MSI_L1C_TL_SGS…8_A004324_T30UXE_B11.jp2”. I would like to think that the IndexError: 11 is related to this, and perhaps the dataset is at fault, not sen2cor.

Hi all,

I have run the same dataset through Sen2Cor 2.2.1 and it seems to have worked without fault, even at 10m resolution. I used the instructions on page 15 of this document to uninstall 2.0.6 and install 2.2.1.

I hope this helps.

Hi anthony.scarth,
Thanks for sharing such a good news! I have uninstalled the 2.0.6 version, however, problem comes when install the 2.2.1 version. The error was shown in the screenshot. Have you met this situation before when you installed the 2.2.1? Any clues would be appreciated. Many thanks!

I’m not sure, I’m afraid. I am using numpy 1.10.4. Try running

conda install numpy=1.10.4

thanks, anyway, I have successfully installed the 2.2.1 version in another PC, and it seems that the new version works fine with the whole granules .