Can't run sen2cor; Error message: UnicodeDecodeError

Hi there,

I have problems to run sen2cor in snap: When running sen2cor, following error message appears:

Any help much appreciated!

Sincerely,
gábor

Can you please post the full path to your S2 data? (where the manifest file is located)

Hi Andreas,

this here is the path pointing to the folder with the S2 data:
C:\Users\latit_000\Documents\GeoConsulting Applications\Acompanhamento de Safra com Imagens de Satélite\Sentinel 2\S2A_MSIL1C_20170411T134211_N0204_R124_T22KBE_20170411T134328.SAFE

As far as I know, windows permits path length untill 260 characters, which isn’t exceeded in this given path. You think the problem is the accent at “Satélite”? Sen2cor doesn’t read path in unicode?

Sincerely,
gábor

the accent could be one source of an error. The other is that you shouldn’t rename the folder where the data is located. SNAP requires the folder name for some operations and it’s currently only “Sentinel 2” instead of “S2A…”

Hi Andrea,

thank you very much for your help! I was able to run successfully sen2cor in snap.

FYI, I had to change the folder name from Sentinel 2 to
C:\Users\latit_000\Documents\GeoConsulting Applications\Acompanhamento de Safra com Imagens de Satelite\S2A_MSIL1C_TL_MTI__20160317T200622_A003839_T22KBE_N02.SAFE

Please have a look at the screenshot:

Sincerely,
gábor

is your Python variable set correctly?
Exit with status 1 means an error.

Hi Andreas,

I had to change the name of the S2 data folder to “S2A_MSIL1C*.SAFE” to run successfully sen2cor.

Now the sen2cor process finished successfully. Please have a look.

The only drawback left is an error message: “Syntax error in metadata…”. This looks like a minor problem. I will now use the workflow, which you already posted to the forum. Thak you for your help!

or you think, this syntax error in metadata is quite important?

Sincerely,
gábor

Good to hear!

As it seems to run to 100% everything should be fine.