Problem with sen2cor 2.5.5 version

Hello everybody,

I’m using the sen2cor version 2.5.5 by windows command line and i always found this error:

Process L2A_ProcessTile-1:
Traceback (most recent call last):
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\lib\multiprocessing\process.py”, line 258, in _bootstrap
self.run()
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 136, in run
if not self.process_10():
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 179, in process_10
if not self.process_20():
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 158, in process_20
return self.process()
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 229, in process
if self.postprocess() == False:
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 311, in postprocess
if not self.tables.exportBandList():
File “C:\Users\student\Documents\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Tables.py”, line 2307, in exportBandList
fn = os.path.basename(self._L2A_Tile_PVI_File)
AttributeError: ‘L2A_Tables’ object has no attribute ‘_L2A_Tile_PVI_File’

I’m using the TOOLBOX operation mode but the error remain:

Product version: 14.2. Operation mode: TOOLBOX. Processing baseline: 02.05

Someone can help me?

Thank you in advances,

Francesco

1 Like

I’ve got the same problem…

I think that this error has already been reported. Please see:

Ok,

thank you very much now it works.

Hi, i am trying to correct multiple images, but the .bat in prompt command doesn’t work in this version. Just the first image is corrected. I add the file path in the .bat, followed by the name of the image file. Could someone give me some advisadvises?

Hi @brunomontibeller, please, could you explain more in detail your question? What is the .bat or the command that you are trying to execute and what error do you get?

Hi, sorry for my incomplete question

I have installed correctly the Sen2Cor 2.5.5. As the tutorial explain (http://step.esa.int/thirdparties/sen2cor/2.5.5/docs/S2-PDGS-MPC-L2A-SRN-V2.5.5.pdf) if a get this message in the prompt command, it means that it is working.

After that I tried to correct just one image to be sure if it was actually working. Image correct successfully.
However, I wanted to use Sen2Cor to correct 104 images. When I was using the previous versions of sen2cor, I always created a list of my images (as the following image)

First, I call the L2A_Process.bat in the sen2cor source file and then I add the path of each file that I want to correct. From this list of files, which is actually a “.txt” file I convert to a “.bat” file in order to open using the prompt command. Although, different from the other versions, this (2.5.5) is not applying the corrections for all the images, just for the first one. I don’t know if I am doing something wrong or if it is related to this version.
I don’t know if I did myself clear. Let me know if I do not.
Kind regards
Bruno

If I understand correctly you have104 calls of the L2A_Process.bat file in one batch file. You should add call in front of each batch file call, otherwise the parent batch file is terminated.

1 Like

It worked. Thank you very much

I am using sen2cor and keep getting this error for certain products…products with name such as
S2A_OPER_PRD_MSIL1C_PDMC_20170529T050118_R096_V20151206T143732_20151206T143732.SAFE. I am not using command line. Does anyone know how to fix this. Please :frowning:

Hii community,
I have installed standalone version 2.5.5 of sen2cor and i am not able to generate a output file

I had many problems with installing, re-installing, and using SNAP and Sen2Cor. For those interested, I attach the “how to” file I wrote for myself and those it could helphow to use Sen2Cor within SNAP.rtf (10.2 KB)

3 Likes

I’m using Sen2Cor 2.5.5 command line with --sc_only option. With some files (for example, S2A_MSIL1C_20170526T022551_N0204_R046_T51TYM_20170526T022755.SAFE), I keep getting this error.

Syntax error in metadata, see report file for details.
[ERROR] L2A_XmlParse: 120 Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema\S2_User_Product_Level-2A_Metadata.xsd
[ERROR] L2A_XmlParse: 120 Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema\S2_User_Product_Level-2A_Metadata.xsd
[ERROR] L2A_XmlParse: 121 Details: Element ‘FORMAT_CORRECTNESS_FLAG’: This element is not expected. Expected is ( SENSOR_QUALITY_FLAG ).
[ERROR] L2A_XmlParse: 121 Details: Element ‘FORMAT_CORRECTNESS_FLAG’: This element is not expected. Expected is ( SENSOR_QUALITY_FLAG ).
Parsing error:
Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema\S2_User_Product_Level-2A_Metadata.xsd
Details: Element ‘FORMAT_CORRECTNESS_FLAG’: This element is not expected. Expected is ( SENSOR_QUALITY_FLAG ).

Any idea why this is? Thanks!

2 Likes

You could try to run Sen2Cor within SNAP. In my case, it works better. If you work on several datasets, it’ better to close and re-open SNAP, especially after an error message.
Unfortunately it seems that Sen2Cor has some problems with some 2017 data. Apparently ESA not only changed its data format ~at the end of 2016 (from multi-tile to one-tile, long filename for .xml file to a short uniform name), but changed something more minor ~the fall (autumn) of 2017.
Maybe there’s some turnaround, but so far it’s the only explanation I could suggest if the error persists.
If you find the solution to your problem, thanks for sharing it with us!

3 Likes

1-Try using "C:\Users[yourusername].snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\cfg\L2A_GIPP.xml " instead of leaving the box blank, or choosing your own parameters
2-Begin processing your level 1C data at 60m resolution (for a quick test) or 20m resolution first, especially for 2017 and older data; if the program succeeds at 20m, re-run it at 10m.

Update of my “how-to” file
how to use Sen2Cor within SNAP-1.rtf (11.1 KB)

2 Likes

Hii … thanks fr the steps . I am able to generate the l2 folder in the parent safe folder bt then there is no output files in tif format img_data.

Hi Sanaya:
when you launch Sen2Cor, it creates all the needed folders and subfolders for the new L2A data. In the subfolder img-data, a temporary file is created, which grows with the new data as they are calculated from the original L1C tiles. At the end of the process, this temporary file is replaced by the new tiles or just deleted in case of an error, leaving the subfolder empty. The error(s) are reported in the .log file. Usually these errors are “exporting errors”, unless the error(s) occurred earlier. The log file is misleading since it says at the end that the program ended “successfully” even if it didn’t.
I ceased to have these exporting errors after running first Sen2Cor in 20m resolution, then in 10m (the problem seems to occur with data older than 2018). I was always unsuccessful with the command-line operation (I don’t know why, since some people apparently succeed) and now only run Sen2Cor within SNAP.
My advice: after such errors, close SNAP without saving anything, re-open SNAP, re-load your tiles and try again. Also, use the original L2A_GIPP.xml file instead of leaving the box blank, or choosing your own parameters.
Good luck

i launch Sen2Cor correctly thanx

you’re welcome