L2A_Process Unrecognised Arguments

I tried to run this command to use the version 2.5 of the sen2cor

.\L2A_Process.bat --resolution 10 C:\Users\Aaron Abela\Desktop\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\S2A_MSIL1C_20190128T115412.SAFE

But I keep getting this error:

L2A_Process.py: error: unrecognized arguments: Abela\Desktop\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\S2A_MSIL1C_20190128T115412.SAFE

Been at it for hours. Would truly appreciate someones help.

The space in C:\Users\Aaron Abela\Desktop\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\S2A_MSIL1C_20190128T115412.SAFE will treat the path as two separate items (hence the unrecognised argument for the second half)

Try enclosing it in double quotes: “C:\Users\Aaron Abela\Desktop\Sen2Cor-02.05.05-win64\Sen2Cor-02.05.05-win64\S2A_MSIL1C_20190128T115412.SAFE”

I did try what you stated and this was the resulting error:

.\L2A_Process.bat : The term ‘.\L2A_Process.bat’ is not recognized as the name of a cmdlet

Unsure on this one. Is your command window in the same directory as the L2A_Process.bat file is located?

Otherwise, try giving the full path of the file (e.g. “C:\Users\Aaron Abela\L2A_Process.bat” instead of .\L2A_Process.bat). Make sure to change this path to where your L2A_Process file is located.

Here is the screenshot of the concerning files and yes i opened the powershell terminal from this folder of the attached screenshot.

. Any ideas what I am doing wrong?

I’ve got the same prob,maybe i can’t change the path to where my L2A_Process file is located correctly, as Anthony mentions above. On the other hand, i know that after installing the sen2cor, a file called ‘‘Sen2Cor-02.05.05-win64’’ is located inside the path C:/users/my name/.snap/auxdata, maybe u have to check the path of your sen2core installed item?

I don’t really use Windows often, so I’m not really sure why the script isn’t being run properly.

Maybe you could follow ABraun’s guide on installing Sen2Cor inside SNAP?


Thanks ! That is what I did. I installed the Sen2Cor within the SNAP gui :slight_smile:

1 Like