Hello,
The last couple of days I am trying to use Sen2Cor 02.08.00 to atmospherically correct Sentinel 2A-B data of 2019 (Around April to September) on Ubuntu 18.04. I am working with the standalone version of Sen2Cor. I get a python error AttributeError: ‘NoneType’ object has no attribute ‘box_id’
PVI image export failed but I couldn’t locate why the error appears.
Bellow I posted the whole output of the algorithm.
- Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.8.0, created: 2019.02.20, supporting Level-1C product version 14.2 - 14.5 started …
- Product version: 14.5
- Operation mode: TOOLBOX
- Processing baseline: 99.99
- Progress[%]: 0.00 : Generating datastrip metadata
- L1C datastrip found, L2A datastrip successfully generated
- No resolution specified, will process 20 and 10 m resolution
- 20 m resolution will be downsampled to 60 m
- Progress[%]: 0.08 : PID-15083, L2A_ProcessTile: processing with resolution 20 m, elapsed time[s]: 1.968, total: 0:00:09.861098
- Progress[%]: 0.08 : PID-15083, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.000, total: 0:00:09.861569
- Progress[%]: 0.08 : PID-15083, L2A_Tables: start import, elapsed time[s]: 0.068, total: 0:00:09.929293
- Progress[%]: 0.11 : PID-15083, L2A_Tables: band B01 imported, elapsed time[s]: 0.831, total: 0:00:10.760090
- Progress[%]: 0.56 : PID-15083, L2A_Tables: band B02 imported, elapsed time[s]: 11.405, total: 0:00:22.164700
- Progress[%]: 1.04 : PID-15083, L2A_Tables: band B03 imported, elapsed time[s]: 12.315, total: 0:00:34.479215
- Progress[%]: 1.70 : PID-15083, L2A_Tables: band B04 imported, elapsed time[s]: 16.756, total: 0:00:51.235464
- Progress[%]: 1.88 : PID-15083, L2A_Tables: band B05 imported, elapsed time[s]: 4.679, total: 0:00:55.914861
- Progress[%]: 2.08 : PID-15083, L2A_Tables: band B06 imported, elapsed time[s]: 4.987, total: 0:01:00.901776
- Progress[%]: 2.27 : PID-15083, L2A_Tables: band B07 imported, elapsed time[s]: 4.858, total: 0:01:05.759414
- Progress[%]: 2.48 : PID-15083, L2A_Tables: band B8A imported, elapsed time[s]: 5.416, total: 0:01:11.175229
- Progress[%]: 2.54 : PID-15083, L2A_Tables: band B09 imported, elapsed time[s]: 1.536, total: 0:01:12.711526
- Progress[%]: 2.56 : PID-15083, L2A_Tables: band B10 imported, elapsed time[s]: 0.485, total: 0:01:13.196804
- Progress[%]: 2.76 : PID-15083, L2A_Tables: band B11 imported, elapsed time[s]: 5.163, total: 0:01:18.359875
- Progress[%]: 3.09 : PID-15083, L2A_Tables: band B12 imported, elapsed time[s]: 8.348, total: 0:01:26.707977
- Progress[%]: 3.09 : PID-15083, L2A_ProcessTile: start of Scene Classification, elapsed time[s]: 0.006, total: 0:01:26.713596
- Progress[%]: 3.10 : PID-15083, L2A_Tables: band B02 must be resampled, elapsed time[s]: 0.257, total: 0:01:26.970478
- Progress[%]: 3.49 : PID-15083, Pre process , elapsed time[s]: 9.819, total: 0:01:36.789647
- Progress[%]: 3.49 : PID-15083, L2A_Tables: band B01 must be resampled, elapsed time[s]: 0.109, total: 0:01:36.898544
- Progress[%]: 3.71 : PID-15083, L2A_Tables: band B03 must be resampled, elapsed time[s]: 5.584, total: 0:01:42.483021
- Progress[%]: 3.87 : PID-15083, L2A_Tables: band B04 must be resampled, elapsed time[s]: 4.139, total: 0:01:46.621562
- Progress[%]: 4.03 : PID-15083, L2A_Tables: band B09 must be resampled, elapsed time[s]: 4.104, total: 0:01:50.725634
- Progress[%]: 4.14 : PID-15083, L2A_Tables: band B10 must be resampled, elapsed time[s]: 2.659, total: 0:01:53.384891
- Progress[%]: 4.26 : PID-15083, L2A_SC init , elapsed time[s]: 3.037, total: 0:01:56.421837
- Progress[%]: 4.37 : PID-15083, L2A_CSND_1_1 , elapsed time[s]: 2.924, total: 0:01:59.345994
- Progress[%]: 4.85 : PID-15083, L2A_CSND_1_2 , elapsed time[s]: 12.194, total: 0:02:11.540321
- Progress[%]: 4.87 : PID-15083, L2A_CSND_2_0 , elapsed time[s]: 0.659, total: 0:02:12.198941
- Progress[%]: 4.93 : PID-15083, L2A_CSND_2_1 , elapsed time[s]: 1.513, total: 0:02:13.712303
- Progress[%]: 4.96 : PID-15083, L2A_CSND_2_1_2, elapsed time[s]: 0.762, total: 0:02:14.474108
- Progress[%]: 4.99 : PID-15083, L2A_CSND_2_2 , elapsed time[s]: 0.584, total: 0:02:15.057730
- Progress[%]: 5.02 : PID-15083, L2A_CSND_2_3 , elapsed time[s]: 0.819, total: 0:02:15.877017
- Progress[%]: 5.08 : PID-15083, L2A_CSND_2_4 , elapsed time[s]: 1.503, total: 0:02:17.379761
- Progress[%]: 5.18 : PID-15083, L2A_CSND_2_5 , elapsed time[s]: 2.690, total: 0:02:20.070029
- Progress[%]: 5.18 : PID-15083, L2A_SnowPostProcessingCCI , elapsed time[s]: 0.002, total: 0:02:20.072035
- Progress[%]: 5.29 : PID-15083, L2A_CSND_3 , elapsed time[s]: 2.705, total: 0:02:22.777397
- Progress[%]: 5.37 : PID-15083, L2A_CSND_5_1 , elapsed time[s]: 2.119, total: 0:02:24.896869
- Progress[%]: 5.50 : PID-15083, L2A_CSND_5_2 , elapsed time[s]: 3.176, total: 0:02:28.073189
- Progress[%]: 5.59 : PID-15083, L2A_CSND_6 , elapsed time[s]: 2.368, total: 0:02:30.441582
- Progress[%]: 5.65 : PID-15083, L2A_CSND_6_2 , elapsed time[s]: 1.649, total: 0:02:32.090771
- Progress[%]: 5.71 : PID-15083, L2A_CSND_7 , elapsed time[s]: 1.498, total: 0:02:33.589076
- Progress[%]: 7.87 : PID-15083, L2A_SHD , elapsed time[s]: 54.886, total: 0:03:28.474593
- Progress[%]: 7.95 : PID-15083, DV recovery , elapsed time[s]: 2.078, total: 0:03:30.552502
- Progress[%]: 8.02 : PID-15083, WP recovery , elapsed time[s]: 1.828, total: 0:03:32.380040
- Progress[%]: 8.02 : PID-15083, WP recovery with CCI Water Bodies at 150m , elapsed time[s]: 0.002, total: 0:03:32.381777
- Progress[%]: 8.13 : PID-15083, Snow recovery , elapsed time[s]: 2.863, total: 0:03:35.244734
- Progress[%]: 8.17 : PID-15083, Soil recovery , elapsed time[s]: 0.949, total: 0:03:36.193394
- Progress[%]: 8.17 : PID-15083, Land recovery with B10, B09 and B8A , elapsed time[s]: 0.002, total: 0:03:36.195195
- Progress[%]: 8.17 : PID-15083, Cirrus recovery with B10 , elapsed time[s]: 0.001, total: 0:03:36.196600
- Progress[%]: 8.17 : PID-15083, Urban and Bare pixel recovery with CCI Land Cover Map at 300 m , elapsed time[s]: 0.001, total: 0:03:36.197930
- Progress[%]: 8.17 : PID-15083, Post process , elapsed time[s]: 0.000, total: 0:03:36.198265
- Progress[%]: 8.34 : PID-15083, L2A_ProcessTile: start of Atmospheric Correction, elapsed time[s]: 4.411, total: 0:03:40.609509
- Progress[%]: 8.42 : PID-15083, L2A_AtmCorr: end of calculation terrain maps, elapsed time[s]: 2.031, total: 0:03:42.640763
- Progress[%]: 8.42 : PID-15083, L2A_AtmCorr: start of AOT retrieval at 550nm, elapsed time[s]: 0.002, total: 0:03:42.642293
- Progress[%]: 8.73 : PID-15083, L2A_AtmCorr: end of internal classification, elapsed time[s]: 7.943, total: 0:03:50.585211
- Progress[%]: 8.77 : PID-15083, L2A_AtmCorr: end of interpolation LUTs, elapsed time[s]: 0.904, total: 0:03:51.489703
- Progress[%]: 9.66 : PID-15083, L2A_AtmCorr: end retrieving reference pixels for dark areas, elapsed time[s]: 22.664, total: 0:04:14.154147
- Progress[%]: 13.27 : PID-15083, L2A_AtmCorr: end of check for negative reflectance pixels, elapsed time[s]: 92.030, total: 0:05:46.183933
- Progress[%]: 13.45 : PID-15083, L2A_AtmCorr: the rescaling of path radiance in blue band has been disabled by configuration, elapsed time[s]: 4.657, total: 0:05:50.840731
- Progress[%]: 15.34 : PID-15083, L2A_AtmCorr: end of visibility index calculation, elapsed time[s]: 48.130, total: 0:06:38.971060
- Progress[%]: 15.34 : PID-15083, L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]: 0.001, total: 0:06:38.971940
- Progress[%]: 15.34 : PID-15083, L2A_AtmCorr: start of water vapour retrieval, elapsed time[s]: 0.001, total: 0:06:38.972497
- Progress[%]: 15.42 : PID-15083, L2A_AtmCorr: end of water vapour retrieval preparation, elapsed time[s]: 2.057, total: 0:06:41.029340
- Progress[%]: 24.08 : PID-15083, L2A_AtmCorr: end of water vapour retrieval, elapsed time[s]: 220.944, total: 0:10:21.973717
- Progress[%]: 24.08 : PID-15083, L2A_AtmCorr: preparation of surface reflectance retrieval, elapsed time[s]: 0.001, total: 0:10:21.974221
- Progress[%]: 24.37 : PID-15083, L2A_AtmCorr: end of surface reflectance retrieval preparation, elapsed time[s]: 7.477, total: 0:10:29.450936
- Progress[%]: 24.37 : PID-15083, L2A_AtmCorr: start of surface reflectance retrieval, elapsed time[s]: 0.001, total: 0:10:29.451452
- Progress[%]: 30.34 : PID-15083, L2A_AtmCorr: end of surface reflectance retrieval, elapsed time[s]: 152.082, total: 0:13:01.533195
- Progress[%]: 30.39 : PID-15083, L2A_AtmCorr: start of rho retrieval step 2, elapsed time[s]: 1.424, total: 0:13:02.956908
- Progress[%]: 33.59 : PID-15083, L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 81.447, total: 0:14:24.404298
- Progress[%]: 33.59 : PID-15083, L2A_ProcessTile: start of post processing, elapsed time[s]: 0.123, total: 0:14:24.527634
- Progress[%]: 33.59 : PID-15083, L2A_Tables: start export for 20 m resolution, elapsed time[s]: 0.001, total: 0:14:24.528255
- Progress[%]: 34.00 : PID-15083, L2A_Tables: band B02 exported, elapsed time[s]: 10.294, total: 0:14:34.822449
- Progress[%]: 34.38 : PID-15083, L2A_Tables: band B03 exported, elapsed time[s]: 9.739, total: 0:14:44.561756
- Progress[%]: 34.76 : PID-15083, L2A_Tables: band B04 exported, elapsed time[s]: 9.737, total: 0:14:54.299027
- Progress[%]: 35.13 : PID-15083, L2A_Tables: band B05 exported, elapsed time[s]: 9.451, total: 0:15:03.749836
- Progress[%]: 35.50 : PID-15083, L2A_Tables: band B06 exported, elapsed time[s]: 9.481, total: 0:15:13.230688
- Progress[%]: 35.88 : PID-15083, L2A_Tables: band B07 exported, elapsed time[s]: 9.705, total: 0:15:22.935237
- Progress[%]: 36.27 : PID-15083, L2A_Tables: band B8A exported, elapsed time[s]: 9.719, total: 0:15:32.654182
- Progress[%]: 36.63 : PID-15083, L2A_Tables: band B11 exported, elapsed time[s]: 9.311, total: 0:15:41.965475
- Progress[%]: 37.00 : PID-15083, L2A_Tables: band B12 exported, elapsed time[s]: 9.331, total: 0:15:51.296922
- Progress[%]: 37.05 : PID-15083, L2A_Tables: band SCL exported, elapsed time[s]: 1.498, total: 0:15:52.794526
- Progress[%]: 37.10 : PID-15083, L2A_Tables: band SNW exported, elapsed time[s]: 1.173, total: 0:15:53.967250
- Progress[%]: 37.19 : PID-15083, L2A_Tables: band CLD exported, elapsed time[s]: 2.270, total: 0:15:56.236903
- Progress[%]: 37.25 : PID-15083, L2A_Tables: band AOT exported, elapsed time[s]: 1.549, total: 0:15:57.785675
- Progress[%]: 37.55 : PID-15083, L2A_Tables: band WVP exported, elapsed time[s]: 7.684, total: 0:16:05.469506
- Progress[%]: 37.59 : PID-15083, L2A_Tables: band VIS exported, elapsed time[s]: 1.037, total: 0:16:06.506956
- ‘NoneType’ object has no attribute ‘box_id’
- Traceback (most recent call last):
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Tables.py”, line 2701, in createRgbImages
-
self.glymurWrapper(pvi, dstack((r, g, b)))
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/sen2cor/L2A_Tables.py”, line 2616, in glymurWrapper
-
jp2_L2A.wrap(file_L2A_geo, boxes=boxes_L2A)
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/glymur/jp2k.py”, line 866, in wrap
-
self._validate_jp2_box_sequence(boxes)
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/glymur/jp2k.py”, line 1680, in _validate_jp2_box_sequence
-
self._validate_jp2h(boxes)
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/glymur/jp2k.py”, line 1748, in _validate_jp2h
-
self._check_jp2h_child_boxes(boxes, 'top-level')
- File “/home/case/Sen2Cor-02.08.00-Linux64/lib/python2.7/site-packages/glymur/jp2k.py”, line 1800, in _check_jp2h_child_boxes
-
box_ids = set([box.box_id for box in boxes])
- AttributeError: ‘NoneType’ object has no attribute ‘box_id’
- PVI image export failed
- Progress[%]: 37.61 : PID-15083, L2A_Tables: PVI image export failed, elapsed time[s]: 0.441, total: 0:16:06.947659
- Progress[%]: 37.61 : PID-15083, L2A_Tables: stop export, elapsed time[s]: 0.000, total: 0:16:06.948095
- Progress[%]: 37.61 : PID-15083, L2A_Tables: preparing downsampled export for 60 m resolution, elapsed time[s]: 0.025, total: 0:16:06.972856
- Progress[%]: 37.61 : PID-15083, L2A_Tables: start export for 60 m resolution, elapsed time[s]: 0.032, total: 0:16:07.004661
- Progress[%]: 37.68 : PID-15083, L2A_Tables: band B01 exported, elapsed time[s]: 1.753, total: 0:16:08.757487
- Progress[%]: 37.75 : PID-15083, L2A_Tables: band B02 exported, elapsed time[s]: 1.886, total: 0:16:10.643766
- Progress[%]: 37.83 : PID-15083, L2A_Tables: band B03 exported, elapsed time[s]: 1.946, total: 0:16:12.589516
- Progress[%]: 37.91 : PID-15083, L2A_Tables: band B04 exported, elapsed time[s]: 2.033, total: 0:16:14.622558
- Progress[%]: 37.99 : PID-15083, L2A_Tables: band B05 exported, elapsed time[s]: 2.026, total: 0:16:16.648894
- Progress[%]: 38.07 : PID-15083, L2A_Tables: band B06 exported, elapsed time[s]: 2.058, total: 0:16:18.706988
- Progress[%]: 38.15 : PID-15083, L2A_Tables: band B07 exported, elapsed time[s]: 1.943, total: 0:16:20.650001
- Progress[%]: 38.23 : PID-15083, L2A_Tables: band B8A exported, elapsed time[s]: 2.029, total: 0:16:22.678607
- Progress[%]: 38.31 : PID-15083, L2A_Tables: band B09 exported, elapsed time[s]: 2.016, total: 0:16:24.694550
- Progress[%]: 38.38 : PID-15083, L2A_Tables: band B11 exported, elapsed time[s]: 1.952, total: 0:16:26.646806
- Progress[%]: 38.46 : PID-15083, L2A_Tables: band B12 exported, elapsed time[s]: 1.978, total: 0:16:28.625270
- Progress[%]: 38.46 : PID-15083, L2A_Tables: band DEM must be resampled, elapsed time[s]: 0.002, total: 0:16:28.627241
- Progress[%]: 38.58 : PID-15083, L2A_Tables: band SCL exported, elapsed time[s]: 3.049, total: 0:16:31.676017
- Progress[%]: 38.61 : PID-15083, L2A_Tables: band SNW exported, elapsed time[s]: 0.652, total: 0:16:32.328351
- Progress[%]: 38.63 : PID-15083, L2A_Tables: band CLD exported, elapsed time[s]: 0.716, total: 0:16:33.044404
- Progress[%]: 38.66 : PID-15083, L2A_Tables: band AOT exported, elapsed time[s]: 0.702, total: 0:16:33.746384
- Progress[%]: 38.73 : PID-15083, L2A_Tables: band WVP exported, elapsed time[s]: 1.656, total: 0:16:35.401906
- Progress[%]: 38.73 : PID-15083, L2A_Tables: band DDV must be resampled, elapsed time[s]: 0.002, total: 0:16:35.403644
- Progress[%]: 38.73 : PID-15083, L2A_Tables: band TCI must be resampled, elapsed time[s]: 0.005, total: 0:16:35.408448
- Progress[%]: 38.83 : PID-15083, L2A_Tables: band TCI exported, elapsed time[s]: 2.632, total: 0:16:38.039988
- Module L2A_T34SFJ_A012989_20190901T092744 failed
- Progress[%]: 100.00 : Application terminated with at least one error.
I get the same error when I am trying the default all or 10 meters resolution.
Thank you for any help you can offer,
Alexandros