Sen2cor 2.4.0 fails on a NON VEGETATED product

Just to let you know sen2cor 2.4.0. with the standalone installer, on a centOS 7 computer failed when processing a product on a desertic site.

Product reference : S2A_OPER_PRD_MSIL1C_PDMC_20160416T225749_R121_V20160416T082220_20160416T082220.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160416T122809_A004265_T36RXV_N02.01

Several other products fail in the time series over that site, but not all of them, for instance, not this one : S2A_OPER_PRD_MSIL1C_PDMC_20160526T164051_R121_V20160526T082013_20160526T082013.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160526T120458_A004837_T36RXV_N02.02

Command line :
L2A_Process --resolution 10 S2A_OPER_PRD_MSIL1C_PDMC_20160416T225749_R121_V20160416T082220_20160416T082220.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160416T122809_A004265_T36RXV_N02.01

Error message
Sentinel-2 Level 2A Processor (Sen2Cor), 2.4.0, created: 2017.06.05 started …
selected resolution is 10 m.
Process L2A_ProcessTile-1:
Traceback (most recent call last):
File “/mnt/data/home/hagolleo/PROG/SEN2COR/Sen2Cor-2.4.0-Linux64/lib/python2.7/multiprocessing/”, line 258, in _bootstrap
File “/mnt/data/home/hagolleo/PROG/SEN2COR/Sen2Cor-2.4.0-Linux64/lib/python2.7/site-packages/sen2cor/”, line 135, in run
if self.process_10() == False:
File “/mnt/data/home/hagolleo/PROG/SEN2COR/Sen2Cor-2.4.0-Linux64/lib/python2.7/site-packages/sen2cor/”, line 168, in process_10
File “/mnt/data/home/hagolleo/PROG/SEN2COR/Sen2Cor-2.4.0-Linux64/lib/python2.7/site-packages/sen2cor/”, line 4025, in readPreferences
par = node.NOT_VEGETATED
File “src/lxml/lxml.objectify.pyx”, line 229, in lxml.objectify.ObjectifiedElement.getattr (src/lxml/lxml.objectify.c:3837)
File “src/lxml/lxml.objectify.pyx”, line 450, in lxml.objectify._lookupChildOrRaise (src/lxml/lxml.objectify.c:6541)
AttributeError: no such child: NOT_VEGETATED

It’s true it is not vegetated…

Hi Olivier, I’ll create a ticket and let you know. Cheers,

This is a simple read of a configuration parameter, which obviously fails. Can you attach the following file from your installation?
Thanks, Uwe

I used the standard one without changing anything.
Here is the file content.

 <?xml version="1.0"  encoding="UTF-8"?>
<Level-2A_CAL_SC_Ground_Image_Processing_Parameter xmlns:xsi="" xsi:noNamespaceSchemaLocation="L2A_CAL_SC_GIPP.xsd">
      <!-- modif JL 20151223 (was 0.08)-->
      <!-- modif JL 20151218 (was 0.35)-->
      <!-- modif JL 20151218 (was 0.65)-->
      <!-- modif JL 20151218 (was 0.20)-->
      <!-- modif JL 20151218 (was 0.42)-->
      <!-- modif JL 20151218 (was 0.47 then 0.40)-->
      <!-- modif JL 20151218 (was 0.8 then 0.55)-->
      <!-- modif JL 20151218 (was 1.5 then 0.8)-->

Hi Olivier,
processing up to 10 m with the tile you flagged as failed went through at my test system without the problem you mentioned. Next question: did you choose parallel processing on tile level for the product? Anf if, how many processes? Can you attach the L2A GIPP.xml ? Thanx and Cheers, Uwe

Thanks Uwe,
Thanks for the inquiry !
I used the standard L2A GIPP.xml provided with the installation package. It is attached here.

I do not fully need that product, so if I am the only one to see that issue, do not spend to much time on it.L2A_GIPP.xml (4.5 KB)


The error is strange nevertheless, 1. You showed that the configuration is not corrupt, as the entry NOT_VEGETATED is still there. 2. it’s a simple read of a parameter, no idea why this can fail. If it occurrs more often I need to reinvestigate, but in fact I never observed this issue until now. So I will not continue on this for the moment as I cannot reproduce. OK?

just thinking where to pin this issue…

can you post your PATH, PYTHONPATH and LD_LIBRARY_PATH variable ?

@OHagolle, do you have local python site-packages in ~/.local/ or somewhere to see if there is another lxml package that is getting used. I am just guessing the issue. To really test it you can edit ./bin/L2A_Process and add -s flag to python
$OUT_DIR/bin/python2.7 -s $SEN2COR_BIN/ “$@”

Thanks Rashad,
i added the -s , but it gave the same result (AttributeError: no such child: NOT_VEGETATED). I have things in my path, but nothing special. And what is strange is that sen2cor works for many products except for a few of them on that site, and even on that site, some products are processed.
But as I said, I have enough results. This bug can be set aside until someone else stumbles upon it.
Best regards,

yes, OK ! Thanks Uwe

Same error in windows 10 64 bits, stand alone instalation

can you send config xml?. I can have a look.

Here you are, thank you
L2A_CAL_SC_GIPP.xml (2.7 KB)

thanks. I will look into it. Maybe there is an issue with installed lxml package.
@OHagolle, had same issue but on linux. So i thnk this is not related to *nix packages.

I had a same problem after I updated from sen2cor-2.3.0 to sen2cor-2.4.0.

It works for me when I applied new L2A_Bashrc to update environment variables.

source L2A_Bashrc

can you post output of your L2A_Process ?


I had the same problem, but noticed that it happened when I tried to process the tiles that were already processed with an older version of Sen2Cor (embedded in anaconda2). So I deleted the corresponding L2A products and tried again, this time without problems. Maybe this is an isolated case, I’ll provide more info if error occurs again.

Platform is Linux, I switched to standalone installation.