iCOR - Errors

Hi,

I´m trying to run iCOR (SNAP 6.0) on Landsat-8 and Sentinel-2 imagens and I get the following error:

image

Settings:

Unfortunately, due to the limitation of new user I could put only two printscreens.
Please let me know how can I fix this issue.
Best,

Gustavo

P.s. I have installed python 2.7 and the VS2015 redistributables

Aftermath downloading and run the installation, the next step is to install the plugin from the tool---->download plugin--------> install plugin, later on the iCOR will appear

Then you could apply it according to your product, for example

You could find the manual in your machine in this path, I guess,

C:\Program Files\VITO\iCOR\docs

Hi falahfakhri!

Thanks for your response.
Yes, I ran this step as you can see in the figures bellow:

image
image

But I still do not know who to fix it

When I tried to open a Sentinel-2 image:

for Sentinel-2 you should select the MTL/MTD file, not manifest.safe

This error appeared when tied to open S2 image on iCOR menu

and which file did you select?

I think the problem isn’t related to the opining of the S2 image file, but You need to update your SNAP, (Which version do you use?) Remove the iCOR and Re-install it as I explained to you in the previous post,

Because the first show of this plugin should be this,

Then selecting any of iCOR, let’s say iCOR-S2 will give you this panel,

When you navigate to the source product, this panel directory should be appeared,

Select the MTDD…*xml file, the product will be opened, as the following,

My SNAP was version 6 but I re-installed as you explained.

Now the problem is:

Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 45, in process_product
icor.sentinel2.process_saf(context, product,working_folder)
File “c:\Program Files\VITO\iCOR\src\icor\sentinel2.py”, line 72, in process_saf
granules = sentinel2_metadata.parse(path,bandList)
File “c:\Program Files\VITO\iCOR\src\icor\sentinel2_metadata.py”, line 311, in parse
raise Exception("Something went wrong while parsing the S2 metadata file: s" str(e))
Exception: Something went wrong while parsing the S2 metadata file: must be (buffer overflow), not str
parsing arguments
done
icor installation folder C:\Program Files\VITO\iCOR
running icor for Sentinel2 …
reading config C:\Program Files\VITO\iCOR/src/config/local_sentinel2_simec.ini
output path = c:\Temp\S2B_MSIL1C_20181022T132229_N0206_R038_T22KHA_20181022T164946_processed.tif
iCOR temp folder : c:/users/gustavo/appdata/local/temp/icor_km5g49_proc
workflow = simec
Finished tool execution in 0 seconds

Which python version do you have in your machine, according to the iCOR installation, it should be 2.7,

Also be sure that you have this folder in your directory

C:/Temp

Here also is a solution from @icor

Source of Post

Other solution it works fine for me, open the product in the Product Explorer, in case you python isn’t the source of the problem

iCOR with Sentinel-2 images is OK now. Thanks!
With Landsat-8 TOA images this message appeared when I selected *_MTL.txt file as product guide indicated.:

It worked when I selected “LC08_L1TP_220075_20171224_20180103_01_T1.xml” but returned this error:

Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 39, in process_product
icor.landsat8.process_tgz(context, product,working_folder)
File “c:\Program Files\VITO\iCOR\src\icor\landsat8.py”, line 27, in process_tgz
solar_zenith = l8_metadata.sun_zenith()
File “c:\Program Files\VITO\iCOR\src\icor\landsat8_metadata.py”, line 22, in sun_zenith
return (90.0 - float(self.keys_vars[“SUN_ELEVATION”]))
KeyError: ‘SUN_ELEVATION’
parsing arguments
done
icor installation folder C:\Program Files\VITO\iCOR
running icor for Landsat8 …C:\Program Files\VITO\iCOR
reading config C:\Program Files\VITO\iCOR/src/config/local_landsat8_simec.ini
output path = c:\Temp\LC08_L1TP_220075_20171224_20180103_01_T1 - Level 2_processed.tif
iCOR temp folder : c:/users/gustavo/appdata/local/temp/icor_dn3byc_proc
workflow = simec
Finished tool execution in 0 seconds

Try the same options I suggested to you in the previous post and it works with S-2

Sir, I have encountered a similar error while processing S2 and S3 images. I am using SNAP 7, and installed the lastest version of ICOR available.I have tried chosing the image from the product browser and also by selecting the .xml files.
the error shown for S2 image is
Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 45, in process_product
icor.sentinel2.process_saf(context, product,working_folder)
File “c:\Program Files\VITO\iCOR\src\icor\sentinel2.py”, line 72, in process_saf
granules = sentinel2_metadata.parse(path,bandList)
File “c:\Program Files\VITO\iCOR\src\icor\sentinel2_metadata.py”, line 311, in parse
raise Exception("Something went wrong while parsing the S2 metadata file: s" str(e))
Exception: Something went wrong while parsing the S2 metadata file: coercing to Unicode: need string or buffer, NoneType found
parsing arguments
done
icor installation folder C:\Program Files\VITO\iCOR
running icor for Sentinel2 …
reading config C:\Program Files\VITO\iCOR/src/config/local_sentinel2_simec.ini
output path = c:\Temp\S2B_MSIL1C_20200213T050919_N0209_R019_T43PFL_20200213T084920_processed.tif
iCOR temp folder : c:/users/user/appdata/local/temp/icor_yzy6xg_proc
workflow = simec
Finished tool execution in 0 seconds

The execution output for S3 images is
c:\users\user\appdata\local\temp\atcconf8af7h5.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfbc7osv.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfy7jdhr.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfk_snfa.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfm_t5t6.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfbp1zxu.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf_amvlj.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconffw35es.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfpuop9s.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfhbka_x.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfk6jgyp.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf9mrr1x.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfknf7zj.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfoagboy.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf9gmhcp.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfgxnfrt.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfly9pzt.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfbdxxpt.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf9z4it_.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconftjtgcb.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfi4gwyi.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf2ohxnd.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf8gcbft.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfliwz0r.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf_li0v4.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconf_xrg0b.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconffza58u.conf
Running netcdf_tools c:\users\user\appdata\local\temp\atcconfnly346.conf

13% Relative Azimuth

Running ac_runner c:\users\user\appdata\local\temp\atcconfysfduz.conf
Failed!
Process output:
±--------------------------------------------------------------------
±--------------------------------------------------------------------
Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 52, in process_product
icor.sentinel3.process(context, product,working_folder)
File “c:\Program Files\VITO\iCOR\src\icor\sentinel3.py”, line 205, in process
“relative.azimuth.raa.location=” + location + “angles_raa.tif” + “\n”
File “c:\Program Files\VITO\iCOR\src\icor\context.py”, line 504, in invoke_ac_runner_check
raise Exception(comment)
Exception: process failedac_runner c:\users\user\appdata\local\temp\atcconfysfduz.conf
parsing arguments
done
icor installation folder C:\Program Files\VITO\iCOR
running icor for Sentinel3 …C:\Program Files\VITO\iCOR
reading config C:\Program Files\VITO\iCOR/src/config/local_sentinel3_simec.ini
output path = c:\Temp\S3A_OL_1_EFR____20200213T050023_20200213T050323_20200213T064208_0179_055_019_2700_LN1_O_NR_002_processed.tif
iCOR temp folder : c:/users/user/appdata/local/temp/icor_v7j_zx_proc
workflow = simec
image date/time stamp :: 2020-02-13T05:00:23.033262Z
processing product with name : S3A_OL_1_EFR____20200213T050023_20200213T050323_20200213T064208_0179_055_019_2700_LN1_O_NR_002_SEN3
Finished tool execution in 2 seconds

Please advice

Using Snap 7.0 in Ubuntu 18.04 and Icor plugins downloaded last week.
I cannot load L8 MTL file as indicated in the user manual. For Sentinel 2, MTD file is correctly loaded then error arise when executing ICor.

/usr/bin/python: can’t open file ‘/opt/vito/icor\src\icor.py’: [Errno 2] No such file or directory

Icor for Landsat 8 cannot load MTL file

“/opt/vito/icor\src\icor.py” this line indicates some mixing of unix and win32 code…

Solved. Reinstalled Snap with all toolboxes and it is all working properly.

hi everyone

install icor3 on ubuntu 20 successful.
i try run icor3 with SNAP 8.0 for sentinel2 ,get error. could you help me , thanks

best

binbin

get error:

python3 /opt/vito/icor/src/icor.py --sensor S2 --generate_viewing_grids_s2 false --glint_cor false --keep_intermediate false --apply_gains false --cloud_average_threshold 0.19 --cloud_low_band B01 --cloud_low_threshold 0.25 --cirrus true --aot true --aerosol_type RURAL --aot_window_size 100 --simec false --watervapor false --bg_window 1 --cirrus_threshold 0.01 --aot_override 0.1 --ozone_override 0.33 --wv_override 2.0 --water_band B08 --water_threshold 0.05 --working_folder /tmp/ --output_file /tmp/S2A_MSIL1C_20200622T155911_N0209_R097_T17RNK_20200622T211519_processed.tif /home/binbin/Documents/2020OKE/2020OKE/S2A_MSIL1C_20200622T155911_N0209_R097_T17RNK_20200622T211519/S2A_MSIL1C_20200622T155911_N0209_R097_T17RNK_20200622T211519.SAFE/MTD_MSIL1C.xml
Traceback (most recent call last):
File “/opt/vito/icor/src/icor.py”, line 15, in
import icor.sentinel2
File “/opt/vito/icor/src/icor/sentinel2.py”, line 12, in
from . import glintcor
File “/opt/vito/icor/src/icor/glintcor.py”, line 1, in
import numpy
ModuleNotFoundError: No module named ‘numpy’
Process exited with value 1
Finished tool execution in 0 seconds

Hey @falahfakhri, @ABraun
I’m getting error while working with iCOR Landsat 8 data
Key Error: ‘max_stages’
Any help regarding this would be appreciated.

I would also like to know about, the possibility and procedure to atmospheric correct a specific band (i.e. Band-8)


“c:\Program Files\VITO\iCOR\bin\Python36\python.exe” “c:\Program Files\VITO\iCOR\src\icor.py” --keep_intermediate false --apply_gains false --glint_cor false --cloud_average_threshold 0.2 --cloud_low_band B01 --cloud_low_threshold 0.15 --cirrus true --aot true --aerosol_type RURAL --aot_override 0.1 --aot_window_size 500 --simec false --watervapor false --wv_override 2.0 --bg_window 1 --cirrus_threshold 0.005 --ozone_override 0.33 --water_band B05 --water_threshold 0.05 --sensor L8 --working_folder c:/Temp/ --output_file c:\Temp\LC08_L1TP_195020_20181025_20200830_02_T1_B8_processed.tif “D:\image\New folder\downloads\data for class\New folder\2018\LC08_L1TP_195020_20181025_20200830_02_T1_B8.TIF”
Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 39, in process_product
icor.landsat8.process_tgz(context, product,working_folder)
File “c:\Program Files\VITO\iCOR\src\icor\landsat8.py”, line 27, in process_tgz
l8_metadata.parse_config_file()
File “c:\Program Files\VITO\iCOR\src\icor\landsat8_metadata.py”, line 14, in parse_config_file
for line in config_file:
File “c:\Program Files\VITO\iCOR\bin\Python36\lib\encodings\cp1252.py”, line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x81 in position 134: character maps to
parsing arguments
done
icor installation folder c:\Program Files\VITO\iCOR
running icor for Landsat8 …c:\Program Files\VITO\iCOR
reading config c:\Program Files\VITO\iCOR/src/config/local_landsat8_simec.ini
output path = c:\Temp\LC08_L1TP_195020_20181025_20200830_02_T1_B8_processed.tif
iCOR temp folder : c:/Temp/icor_kpk99kns_proc
workflow = simec
Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 280, in
process_product(context,product)
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 64, in process_product
context.enter_stage(“Remove intermediate files from filesystem”)
File “c:\Program Files\VITO\iCOR\src\icor\context.py”, line 168, in enter_stage
proc = (float(self._stagenr) / float(self._params[“max_stages”])) * 100.0
KeyError: ‘max_stages’
Finished tool execution in 0 seconds


Hi! The “max stages” error in my case was associated with using the cropped Sentinel-2 image. ICOR always needs the original image as input. It can’t be applied to subsets.