Sen2cor 2.8 fails on product from early 2016 - 'bool' object has no attribute 'SPACECRAFT_NAME'

The product is newly downloaded from SciHub. I guess it is nonetheless faulty somehow. Sad story.

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.8.0, created: 2019.02.20, supporting Level-1C product version 14.2 - 14.5 started ...
Old product version 14.2 detected, - will be updated to 14.5
Processing baseline will also be updated
Operation mode: TOOLBOX
Processing baseline: 99.99
Progress[%]:  0.00 : Generating datastrip metadata
Syntax error in metadata, see report file for details.
Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema/S2_PDI_Level-1C_Datastrip_Metadata.xsd
Details: Element 'Image_Display_Order': This element is not expected. Expected is ( Spectral_Information_List ).
Incorrect datastrip L1C xml format
Traceback (most recent call last):
  File "/home/myuser/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Process.py", line 534, in <module>
    sys.exit(main())
  File "/home/myuser/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Process.py", line 482, in main
    L2A_TILES = config.updateTiles()
  File "/home/myuser/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Config.py", line 3669, in updateTiles
    if self.create_L2A_Tile():
  File "/home/myuser/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Config.py", line 3694, in create_L2A_Tile
    self.getEntriesFromDatastrip()
  File "/home/myuser/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Config.py", line 3635, in getEntriesFromDatastrip
    self.spacecraftName = di.SPACECRAFT_NAME.text
AttributeError: 'bool' object has no attribute 'SPACECRAFT_NAME'

Sen2cor 2.5.5 does process the product fine.

Operation mode PDGS is not supported for Product version 14.2.
Operation mode will be reset to TOOLBOX.

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.2. Operation mode: TOOLBOX. Processing baseline: 02.01.
 Selected resolution: 10 m.
Progress[%]: 0.02 : PID-106203, 20 m resolution must be processed first, elapsed time[s]: 0.416, total: 0:00:02.646545
Progress[%]: 0.03 : PID-106203, L2A_ProcessTile: processing with resolution 20 m, elapsed time[s]: 0.305, total: 0:00:02.951272
Progress[%]: 0.03 : PID-106203, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.001, total: 0:00:02.951812
Progress[%]: 0.03 : PID-106203, L2A_Tables: start import, elapsed time[s]: 0.072, total: 0:00:03.024197

So the format detection is perhaps off in both - both report 14.2, but that should be supported by Sen2cor 2.8.0.

ah, no. I now get this weird error Sen2Cor-02.05.05-win64 - AttributeError: 'L2A_Tables' Object has no attribute '_L2A_Tile_PVI_File'

Progress[%]: 5.73 : PID-106203, L2A_ProcessTile: start of Atmospheric Correction, elapsed time[s]: 0.001, total: 0:02:19.837029
Progress[%]: 5.81 : PID-106203, L2A_AtmCorr: end of calculation terrain maps, elapsed time[s]: 1.785, total: 0:02:21.622464
Progress[%]: 5.81 : PID-106203, L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s]: 0.001, total: 0:02:21.623488
Progress[%]: 6.08 : PID-106203, L2A_AtmCorr: end of internal classification, elapsed time[s]: 6.641, total: 0:02:28.264442
Progress[%]: 6.12 : PID-106203, L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 0.821, total: 0:02:29.085315
Progress[%]: 6.12 : PID-106203, L2A_AtmCorr: end retrieving reference pixels for dark areas, elapsed time[s]: 0.001, total: 0:02:29.085974
Progress[%]: 11.07 : PID-106203, L2A_AtmCorr: end of check for dense bright vegetation pixels, elapsed time[s]: 118.846, total: 0:04:27.931544
Progress[%]: 11.41 : PID-106203, L2A_AtmCorr: end of receiving atmospheric functions for all altitudes and visibilities, elapsed time[s]: 8.150, total: 0:04:36.081846
Progress[%]: 11.41 : PID-106203, L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]: 0.001, total: 0:04:36.082485
Progress[%]: 11.41 : PID-106203, L2A_AtmCorr: start of water vapour retrieval, elapsed time[s]: 0.000, total: 0:04:36.082803
Progress[%]: 11.47 : PID-106203, L2A_AtmCorr: end of water vapour retrieval preparation, elapsed time[s]: 1.315, total: 0:04:37.397534
Progress[%]: 17.80 : PID-106203, L2A_AtmCorr: end of water vapour retrieval, elapsed time[s]: 152.010, total: 0:07:09.407656
Progress[%]: 17.80 : PID-106203, L2A_AtmCorr: preparation of surface reflectance retrieval, elapsed time[s]: 0.001, total: 0:07:09.408424
Progress[%]: 18.10 : PID-106203, L2A_AtmCorr: end of surface reflectance retrieval preparation, elapsed time[s]: 7.292, total: 0:07:16.700271
Progress[%]: 20.67 : PID-106203, L2A_AtmCorr: end of surface reflectance retrieval, elapsed time[s]: 61.571, total: 0:08:18.270964
Progress[%]: 22.85 : PID-106203, L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 52.305, total: 0:09:10.576365
Progress[%]: 22.85 : PID-106203, L2A_ProcessTile: start of post processing, elapsed time[s]: 0.009, total: 0:09:10.585833
Progress[%]: 22.85 : PID-106203, L2A_Tables: start export, elapsed time[s]: 0.001, total: 0:09:10.586410
Progress[%]: 22.96 : PID-106203, L2A_Tables: band B02 exported, elapsed time[s]: 2.596, total: 0:09:13.182747
Progress[%]: 23.06 : PID-106203, L2A_Tables: band B03 exported, elapsed time[s]: 2.592, total: 0:09:15.775037
Progress[%]: 23.17 : PID-106203, L2A_Tables: band B04 exported, elapsed time[s]: 2.596, total: 0:09:18.371102
Progress[%]: 23.28 : PID-106203, L2A_Tables: band B05 exported, elapsed time[s]: 2.571, total: 0:09:20.941782
Progress[%]: 23.39 : PID-106203, L2A_Tables: band B06 exported, elapsed time[s]: 2.592, total: 0:09:23.533389
Progress[%]: 23.50 : PID-106203, L2A_Tables: band B07 exported, elapsed time[s]: 2.595, total: 0:09:26.128496
Progress[%]: 23.60 : PID-106203, L2A_Tables: band B8A exported, elapsed time[s]: 2.600, total: 0:09:28.728708
Progress[%]: 23.71 : PID-106203, L2A_Tables: band B11 exported, elapsed time[s]: 2.499, total: 0:09:31.228100
Progress[%]: 23.81 : PID-106203, L2A_Tables: band B12 exported, elapsed time[s]: 2.485, total: 0:09:33.712944
Progress[%]: 23.85 : PID-106203, L2A_Tables: band SCL exported, elapsed time[s]: 0.853, total: 0:09:34.565614
Progress[%]: 23.87 : PID-106203, L2A_Tables: band SNW exported, elapsed time[s]: 0.612, total: 0:09:35.177524
Progress[%]: 23.92 : PID-106203, L2A_Tables: band CLD exported, elapsed time[s]: 1.172, total: 0:09:36.349767
Progress[%]: 23.95 : PID-106203, L2A_Tables: band AOT exported, elapsed time[s]: 0.777, total: 0:09:37.127194
Progress[%]: 24.00 : PID-106203, L2A_Tables: band WVP exported, elapsed time[s]: 1.220, total: 0:09:38.346903
Progress[%]: 24.03 : PID-106203, L2A_Tables: band VIS exported, elapsed time[s]: 0.638, total: 0:09:38.984767
Process L2A_ProcessTile-1:
Traceback (most recent call last):
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/site-packages/sen2cor/L2A_ProcessTile.py", line 136, in run
    if not self.process_10():
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/site-packages/sen2cor/L2A_ProcessTile.py", line 179, in process_10
    if not self.process_20():
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/site-packages/sen2cor/L2A_ProcessTile.py", line 158, in process_20
    return self.process()
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/site-packages/sen2cor/L2A_ProcessTile.py", line 229, in process
    if self.postprocess() == False:
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/site-packages/sen2cor/L2A_ProcessTile.py", line 311, in postprocess
    if not self.tables.exportBandList():
  File "/home/myuser/Sen2Cor-02.05.05-Linux64/lib/python2.7/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'

But that seems to be because I ask for --resolution 10 and Sen2Cor 2.5.5. has this really sad bug there.

Hi,

Have you tried to select ‘all’ resolutions? There is a known bug in that version of sen2cor if choosing only 10 m, but if you select ALL or you don’t set the resolution if running in the command line, it should finish properly.

I had the same issue for S2 data downloaded from google.
In my case the issue turned out to be a missing AUX_DATA directory.
After adding an empty AUX_DATA folder under the root of the SAFE directory it worked. :smile:

Edit: This may have been a different issue. Just noticed that your’s was an old product version, while mine was recent (14.5)