olivierhagolle / MAJA2SEN2COR

Converter of MAJA format to Sen2Cor format
7 stars 1 forks source link

Productname error #2

Open massea opened 5 years ago

massea commented 5 years ago

Hi everyone,

I have the following error while using MAJA2SEN2COR on Opensuse Leap 15, using conda.

(MAJA2SEN2COR_gdal2) amasse@cellulerd-2018-01:~/workspace/MAJA2SEN2COR> python MaccsMuscate2Sen2cor.py -p /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_maja/T32MNC/SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0/ -w /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_sen2cor/
Read command line
############
Command line
############
Product path: /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_maja/T32MNC/SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0/
Reflectance type: FRE
Workspace: /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_sen2cor/
#########################################
Create repository for new Sen2cor product
#########################################
No directory name /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_sen2cor/Sen2cor_ : creation of directory
################
Get product type
################
Product type is Muscate for /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_maja/T32MNC/SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0/
Exception : list index out of range
Traceback (most recent call last):
  File "MaccsMuscate2Sen2cor.py", line 134, in <module>
    s_name = o_product.getName()
  File "/home/amasse/workspace/MAJA2SEN2COR/product/MuscateProduct.py", line 78, in getName
    s_date = s_productName[1].split('-')
IndexError: list index out of range
Programme stop

With the following dependencies in the conda env

(MAJA2SEN2COR_gdal2) amasse@cellulerd-2018-01:~/workspace/MAJA2SEN2COR> conda list
# packages in environment at /home/amasse/anaconda3/envs/MAJA2SEN2COR_gdal2:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl  
bzip2                     1.0.6                h14c3975_5  
ca-certificates           2018.03.07                    0  
cairo                     1.14.12              h8948797_3  
certifi                   2018.11.29               py27_0  
curl                      7.63.0            hbc83047_1000  
expat                     2.2.6                he6710b0_0  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_1  
freexl                    1.0.5                h14c3975_0  
gdal                      2.3.3            py27hbb2a789_0  
geos                      3.7.1                he6710b0_0  
giflib                    5.1.4                h14c3975_1  
glib                      2.56.2               hd408876_0  
hdf4                      4.2.13               h3ca952b_2  
hdf5                      1.10.4               hb1b8bf9_0  
icu                       58.2                 h9c2bf20_1  
intel-openmp              2019.1                      144  
jpeg                      9b                   h024ee3a_2  
json-c                    0.13.1               h1bed415_0  
kealib                    1.4.7                hd0c454d_6  
krb5                      1.16.1               h173b8e3_7  
libboost                  1.67.0               h46d08c1_4  
libcurl                   7.63.0            h20c2e04_1000  
libdap4                   3.19.1               h6ec2957_0  
libedit                   3.1.20170329         h6b74fdf_2  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 8.2.0                hdf63c60_1  
libgdal                   2.3.3                h2e7e64b_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libkml                    1.3.0                h590aaf7_4  
libnetcdf                 4.6.1                h11d0813_2  
libpng                    1.6.36               hbc83047_0  
libpq                     11.1                 h20c2e04_0  
libspatialite             4.3.0a              hb08deb6_19  
libssh2                   1.8.0                h1ba5d50_4  
libstdcxx-ng              8.2.0                hdf63c60_1  
libtiff                   4.0.9                he85c1e1_2  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.8                h26e45fe_1  
mkl                       2019.1                      144  
mkl_fft                   1.0.10           py27ha843d7b_0  
mkl_random                1.0.2            py27hd81dba3_0  
ncurses                   6.1                  he6710b0_1  
numpy                     1.15.4           py27h7e9f1db_0  
numpy-base                1.15.4           py27hde5b4d6_0  
openjpeg                  2.3.0                h05c96fa_1  
openssl                   1.1.1a               h7b6447c_0  
pcre                      8.42                 h439df22_0  
pip                       18.1                     py27_0  
pixman                    0.36.0               h7b6447c_0  
poppler                   0.65.0               h581218d_1  
poppler-data              0.4.9                         0  
proj4                     5.2.0                he6710b0_1  
python                    2.7.15               h9bab390_6  
readline                  7.0                  h7b6447c_5  
setuptools                40.6.3                   py27_0  
sqlite                    3.26.0               h7b6447c_0  
tk                        8.6.8                hbc83047_0  
wheel                     0.32.3                   py27_0  
xerces-c                  3.2.2                h780794e_0  
xz                        5.2.4                h14c3975_4  
zlib                      1.2.11               h7b6447c_3

Directory of MAJA product is as follow:

(MAJA2SEN2COR_gdal2) amasse@cellulerd-2018-01:~/workspace/MAJA2SEN2COR> ll /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_maja/T32MNC/SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0/
total 6669180
drwxrwx--x+ 3 amasse users          0 15 janv. 18:37 DATA
drwxrwx--x+ 2 amasse users          0 17 janv. 18:00 MASKS
-rw-rw-r--+ 1 amasse users  241211786 15 janv. 18:33 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_ATB_R1.tif
-rw-rw-r--+ 1 amasse users   60327266 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_ATB_R2.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:59 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B11_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B11.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:59 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B12_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B12.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:32 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B2.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:32 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B3.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:32 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B4.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:58 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B5_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B5.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:59 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B6_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B6.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:59 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B7_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B7.tif
-rw-r--r--+ 1 amasse  1000  241211774 17 janv. 17:59 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B8A_10M.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B8A.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:32 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_B8.tif
-rw-r--r--+ 1 amasse  1000 2425814686 17 janv. 18:02 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_FRE_STACK.tif
-rw-rw-r--+ 1 amasse users     534662 15 janv. 18:37 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_MTD_ALL.xml
-rw-rw-r--+ 1 amasse users     391737 15 janv. 18:37 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_QKL_ALL.jpg
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B11.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:35 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B12.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:30 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B2.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:30 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B3.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:30 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B4.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:34 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B5.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:34 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B6.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:34 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B7.tif
-rw-rw-r--+ 1 amasse users   60327254 15 janv. 18:34 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B8A.tif
-rw-rw-r--+ 1 amasse users  241211776 15 janv. 18:30 SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0_SRE_B8.tif

Any idea about the error?

aureliecourtois commented 5 years ago

Hi Antoine,

Try without the "/" at the end of your product name: python MaccsMuscate2Sen2cor.py -p /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_maja/T32MNC/SENTINEL2B_20180122-094759-794_L2A_T32MNC_C_V1-0 -w /mnt/data_qnap/projet/eomondis/process/gabon/land_cover2018/data/sentinel2_preprocessed/L2A_sen2cor/

Aurélie