SEN2COR tool

@eblondel Yes I did resolve the problem. The installation manual is somewhat misleading as installiation command python setup.py install actually installs sen2cor under your default Python installation that is usually (for windows) located in C:\Python27. You do not want that. Sen2cor has to be installed under Anaconda Python package. For that I used the following command C:\...\Anaconda2\python.exe setup.py install to sucessfully install the tool.

1 Like

Hi Jegrix, thanks for responding, I followed you instructions to the letter but I am still getting the same SNAP-Warning, No Module named tables. I even uninstall Anaconda2 and reinstall it again upon rebooting my desktop. Please let me know what I am doing wrong. Thanks again

For sen2cor installation I’m following the “SETUP.pdf” file indication. In the step 2.1 after unzipped “sen2cor-2.0.6.zip” file,
I don’t know hot to go on. The tutorial says "Open the folder sen2cor - 2. 0.6 , type “ python setup.py install”. This step is very unclear for me. Where do I have to type? Thanks in advance.

Open anaconda 2 command prompt then unzip the sen2corr package in the same folder of anaconda2 under the users folders then C:…\Anaconda2\python.exe setup.py install.
Anyway there is a bug and I can’t still manage to apply actor to the S2 files but I am pretty sure they are now working to solve the issue soon. Greetings

Hi there!

I have installed SEN@COR separately form SNAP, I think that I followed by all instructions. Unfortunately, when I want to use SEN2COR I have this kind of problem:

I would be grateful for some help. I don;t have any idea what to do.

Thanks a lot.

Hi, I’m having some problems installing sen2cor and looking for some tips. I tried to install it on two different (windows) machines and neither works. On one machine it actually seems to install correctly but any L2A_Process I run immediately shows a “python.exe has stopped working” error with the following error in the command prompt:

File “c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\openjp2.py”, line 1268, in _stream_create_default_file_stream_2p0
stream = OPENJP2.opj_stream_create_default_file_stream(fptr, read_stream)
WindowsError: exception: access violation writing 0x0000000000000024

If running the L2A_Process --help command it will show no errors in the command prompt but again the “python.exe has stopped working” is shown. On the other machine it seems installation failed since the L2A_Process --help shows the following:

c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\con
fig.py:102: UserWarning: The library specified by configuration file at C:\Users
\user\Anaconda2\Scripts\openjp2.dll could not be loaded.
warnings.warn(msg.format(path), UserWarning)
c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\con
fig.py:151: UserWarning: Neither the openjp2 nor the openjpeg library could be l
oaded.

If running the same on an S2 file then it will also display this:

ImportError: DLL load failed: The application has failed to start because its si
de-by-side configuration is incorrect. Please see the application event log or u
se the command-line sxstrace.exe tool for more detail.

Both machines are 64-bit windows where I installed Anaconda2 and sen2cor 2.0.6. Ideas? Thanks

OK the “python.exe has stopped working” machine is working now! I had references to GDAL in the system environment variables, removed those and reinstalled. I suggest adding this as a note in the setup.pdf file

Hello Chris,

I obtained the same error. Did you solve it?

Many thanks

Hey there,

no not yet. For the moment i am waiting for an update of sen2cor and foccusing on data aquisition …
Hope to get feedback soon :smile:

Marco Do you have Windows 7, 8, or 10? I have 7 and also shown the same problem (DLL load failed: The application has failed to start because its si
de-by-side configuration is incorrect. Please see the application event log or u
se the command-line sxstrace.exe tool for more detail.) On ma second computer whera i have windows 10 this problem doesn’t appear but i have difficult in SNAP ;]

Hello aglazek,
I encountered the same issue and the solution is very simple : you just have to check that the folder name of your input data still contains “1C_” reference as it will be necessary for the Sen2Cor processing. You probably renamed it totally due to the long path name issue. It must contain at least “S2A_OPER_L1C_” to work correctly.

Hope it helps.

Caroline

Thanks a lot Caroline for your answer,

unfortunately I have this problem all the time. My Source Product (in Sen2COR extension) is the hole name of the folder Sentinel (this long, long name) - I haven’t changed anything. I chosed Target Product name as TOA and my directory to save TOA product is the same folder where is the source image.

Honestly I don’t know now what I am doing wrong. I need to make atmoshperic correction and cannot resolve this problem.

Best regards
Ala

Dear Uwe,

I am having trouble using Sen2Cor tool. The treatment seems actually to go well and the products are generated without errors but when I opened them with SNAP, the bands part only contains “Sun” and “View” features but no bands are visible. I tried with the 60 m resolution. You can find in attached file the log file and the screen capture.
Also, when I opened the Sentinel 2 results, the folders arborescence seems allright and all the bands are generated.

If you have any idea what could be wrong…
Thank you for your kind reply.

L2A_20160126T152849_trace.xml (8.8 KB)
L2A_20160126T152849_report.xml (56.0 KB)

Caroline

Windows 10 but I find it a bit fishy that the operating system version would be at fault. Unfortunately its because the software is no good…

Hi Caroline,
I have the same error, starting sen2cor from the SNAP toolbox. However, if I start sen2cor from the command-line, everything works fine.

Regards,
Ralf

This is because it is not possible to choose which reader will be used after the product is computed and opened is SNAP automatically, but the product should be ok. You can try to re-open it in SNAP and choose the appropriate reader (60m if the product was computed at 60m, etc.). Can you confirm the product is ok if you re-open it?

Re-opening fails, regardless of which reader (10m, 20m, 60m).

Comparing the L2A datasets, the one from the command-line processing is a little bigger and contains more files.

Additionally, in the xml-file in the root folder entries of S2A_USER_DEM_…60m in ‘General_Info - L2A_Product_Info - L2A_Product_Organisation - Granule_List - Granules’ are missing. The S2A_USER_DEM_L2A_…60m.jp2 files in the S2A_USER_PRD_MSIL2A_PDMC_20151207T180211_R108_10mCMD\GRANULE\Tiles\AUX_DATA folders have only been produced in the command-line processing. In both cases, the folder for DEM storage in the L2A_GIPP.xml has been set.

Regards,
Ralf

SNAP is just launching the SEN2COR from the command line and the SEN2COR is generating the output files so it shouldn’t be different.
What option do you use to launch SEN2COR from the command line?

L2A_Process --resolution 10 D:…(folder)

Thanks, this is exactly what SNAP is doing. May be @umwilm would know what could be the difference?