olivierhagolle / Start_maja

To process a Sentinel-2 time series with MAJA cloud detection and atmospheric correction processor
Other
51 stars 15 forks source link

UnboundLocalError: local variable 'L2type' referenced before assignment #21

Closed bim2010 closed 5 years ago

bim2010 commented 5 years ago

Hi Olivier, Here is command I'm typing in: python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t T36UVG -s T36UVG -d 20180503 GIPP_MAJA_1_0_S2AS2B_NATIF maja output:

root@localhost Start_maja]# python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t T36UVG -s T36UVG -d 20180503
['/opt/maja/Start_maja', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages']

2018-11-14 09:11:14,895 - Start-Maja - INFO - No existing L2 product, we start with backward mode
2018-11-14 09:11:14,896 - Start-Maja - INFO - => processing date 20180503
2018-11-14 09:11:14,897 - Start-Maja - INFO - dates to process in backward mode :
2018-11-14 09:11:14,897 - Start-Maja - INFO - -- 20180503 : /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE
2018-11-14 09:11:14,898 - Start-Maja - INFO - -- 20180508 : /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180508T085601_N0206_R007_T36UVG_20180508T141842.SAFE
2018-11-14 09:11:14,898 - Start-Maja - INFO - -- 20180511 : /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180511T090601_N0206_R050_T36UVG_20180511T103619.SAFE
2018-11-14 09:11:14,898 - Start-Maja - INFO - -- 20180513 : /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180513T085559_N0206_R007_T36UVG_20180513T110715.SAFE
2018-11-14 09:11:14,898 - Start-Maja - INFO - -- 20180521 : /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180521T090601_N0206_R050_T36UVG_20180521T104113.SAFE
2018-11-14 09:11:14,899 - Start-Maja - INFO - -- 20180526 : /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180526T091019_N0206_R050_T36UVG_20180526T125255.SAFE
2018-11-14 09:11:14,899 - Start-Maja - INFO - -- 20180528 : /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180528T085641_N0206_R007_T36UVG_20180528T103122.SAFE
2018-11-14 09:11:14,899 - Start-Maja - INFO - -- 20180531 : /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180531T091031_N0206_R050_T36UVG_20180531T111240.SAFE
2018-11-14 09:11:14,908 - Start-Maja - INFO - #################################
2018-11-14 09:11:14,909 - Start-Maja - INFO - #################################
2018-11-14 09:11:14,909 - Start-Maja - INFO - processing /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE in backward mode
2018-11-14 09:11:14,909 - Start-Maja - INFO - Initialisation mode with backward is longer
2018-11-14 09:11:14,909 - Start-Maja - INFO - MAJA logfile: /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE.log
2018-11-14 09:11:14,909 - Start-Maja - INFO - #################################
2018-11-14 11:46:53,016 - Start-Maja - INFO - => processing date 20180508
Traceback (most recent call last):
  File "start_maja.py", line 536, in <module>
    start_maja(folder_file, context, site, tile, orbit, nb_backward, options, debug_mode)
  File "start_maja.py", line 395, in start_maja
    logger.info("Using %s L2 type"%L2type)     
UnboundLocalError: local variable 'L2type' referenced before assignment
[root@localhost Start_maja]#

Happy GIS Day!

Best regards, Igor S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE.log

olivierhagolle commented 5 years ago

Hi Igor, before spending time on this, just wondering if you paid attention to the first lines of the readme file :

NB Start maja has been updated to work with MAJA 3.1 , but MAJA 3.1 is not available yet. Meanwhile, please use MAJA 1_0, and read the corresponding readme file. To do that, please use git checkout Start_maja_V1.

So did you use git checkout Start_maja_V1 ? Olivier