Sen2Cor 2.5.5 failing for Product version: 14.5


#1

I keep getting an error when i run Sen2Cor 2.5.5 on this product “S2A_MSIL1C_20171030T104151_N0206_R008_T32UND_20171030T141121.SAFE”, which has a product version of 14.5. Sen2Cor runs successfully for other product versions. The error traceback is shown below:

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.5.5, created: 2018.03.19, supporting Level-1C product version <= 14.5 started …
Product version: 14.5. Operation mode: PDGS. Processing baseline: 02.06.
Traceback (most recent call last):
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 354, in
sys.exit(main())
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 309, in main
L2A_TILES = updateTiles(config)
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 40, in updateTiles
L1C_TILES = config.createOrUpdateL2A_UserProduct()
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 3356, in createOrUpdateL2A_UserProduct
self.createAtmDataFilename()
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 4572, in createAtmDataFilename
delta = self.assignOzoneContent()
File “C:\Users\tetteh\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 4620, in assignOzoneContent
self.ozoneContent = min(columns, key=columns.get)
AttributeError: ‘NoneType’ object has no attribute ‘get’

Has anyone encountered this problem and what was the solution.

Thanks a lot in advance.


#2

So, I solved this directly in the code by setting the product version to 14.2 instead of using the default version of 14.5, so that TOOLBOX is used as the operation mode instead of PDGS. Sen2Cor 2.5.5 reported some XML validation errors, but was able to successfully create the BOA products.


#3

My problem is different: the process works almost until the end then fails to export the files (in Windows 10; in Win 8.1, it works), either within SNAP or in command line. Maybe what you did, changing the product version, could do the trick. How did you do that?
Thanks


#4

I get the same issue when using “AUTO” rather than preselected “WINTER” or “SUMMER” which is not a good idea in an automated processing chain.
The reaons is that sen2cor\L2A_Config.py", line 4620, does not contain any code to support “AUTO” detection…


#5

I made the change directly in the code by inserting the code block below after line 4748 in the “setProductVersion” function of the “L2A_Config.py” file.

                    if self.productVersion > float32(14.2):
                      self.productVersion = float32(14.2)

Hope it helps you guys!


#6

Very good! Thank you.


#7

By the way I solved my problem with exporting the files at the end of the process: I reinstalled everything from scratch after hours and hours of unsuccessful trial and error. Now, it works fine, at least from within SNAP. My feeling is that when something gets wrong in the first, in Sen2Cor some files have been modified in a way that there’s no easy turnaround.


#8

I normally use the CLI and not SNAP. Thanks for the pointers.


#9

Same problem here Markus, with Sen2Cor-02.05.05-win64.

I also get problems when Aerosol_Type is set to AUTO.

This should be fixed asap.