Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.2.1, created: 2016.04.29 started …
Traceback (most recent call last):
File “C:\Programs\Anaconda2\Scripts\L2A_Process-script.py”, line 9, in
load_entry_point(‘sen2cor==2.2.1’, ‘console_scripts’, ‘L2A_Process’)()
File “C:\Programs\Anaconda2\lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor\L2A_Process.py”, line 228, in main
L2A_TILES = updateTiles(config)
File “C:\Programs\Anaconda2\lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor\L2A_Process.py”, line 33, in updateTiles
L1C_TILES = config.createOrUpdateL2A_UserProduct()
File “C:\Programs\Anaconda2\lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor\L2A_Config.py”, line 2917, in createOrUpdateL2A_UserProduct
self._dnScale = float32(pic.QUANTIFICATION_VALUE.text)
AttributeError: ‘bool’ object has no attribute ‘QUANTIFICATION_VALUE’
Is it possible to solve this problem?
Thank you for your help,
Best regards,
Alzira
I also had this error. It turns out that Sen2Cor’s approach to picking up the metadata XML file within the product .SAFE folder is not particularly clever, so if you have any other XML files in there besides the {product}.xml file then it might pick the wrong one up. Delete any additional XML files in the {product}.SAFE folder, such as those generated by QGIS if you have previously opened/exported the L1C data, then run the script again.
My problem has been solved with the set environment variables:
In command prompt (Windows 7, 64-bit) :
#---------------------------------------# @echo off
SET PATH=C:\Programs\Anaconda2;C:\Programs\Anaconda2\Scripts;%PATH%
SET GDAL_DATA=C:\Programs\Anaconda2\Lib\site-packages\sen2cor-2.2.1-py2.7.egg/sen2cor\cfg\gdal_data
SET GDAL_DRIVER_PATH=C:\Programs\Anaconda2\Lib\site-packages\osgeo\gdalplugins
SET PYTHONPATH=C:\Programs\Anaconda2\Lib\site-packages
SET SEN2COR_BIN=C:\Programs\Python27\Lib\site-packages\sen2cor-2.2.1-py2.7.egg/sen2cor
#—
The data set in C :\
#—
Z:>L2A_Process C:\S2A\S2A_OPER_MTD_SAFL1C_PDMC_20160514T140908_R092_V20160514T075819_20160514T075819.SAFE --resolution=10
Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.2.1, created: 2016.04.29 started …
selected resolution is 10 m.
Progress[%]: 0.03 : PID-6980, L2A_ProcessTile: processing with resolution 20 m, elapsed time[s]: 7.856
Progress[%]: 0.03 : PID-6980, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.004
Progress[%]: 0.03 : PID-6980, L2A_Tables: start import, elapsed time[s]: 0.343
Progress[%]: 0.05 : PID-6980, L2A_Tables: band B01 imported, elapsed time[s]: 6.522
Progress[%]: 0.09 : PID-6980, L2A_Tables: band B02 imported, elapsed time[s]: 14.729
Progress[%]: 0.14 : PID-6980, L2A_Tables: band B03 imported, elapsed time[s]: 14.679
Progress[%]: 0.19 : PID-6980, L2A_Tables: band B04 imported, elapsed time[s]: 15.596
Progress[%]: 0.20 : PID-6980, L2A_Tables: band B05 imported, elapsed time[s]: 4.211
Make sure there is no another python version except the anaconda one. I uninstalled the C:\python27 version and the sen2cor, and reinstalled it and numpy, scipy and matplotlib, and it worked.