Parsing Sentinel 2 metadata file error


When I am trying to run iCOR (Linux + Snap 6.0) with a Sentinel 2 imagery i am getting the following error

Traceback (most recent call last):
File “/opt/vito/icor/src/”, line 44, in process_product
icor.sentinel2.process_tar(context, product,working_folder)
File “/opt/vito/icor/src/icor/”, line 72, in process_tar
granules = sentinel2_metadata.parse(path,bandList)
File “/opt/vito/icor/src/icor/”, line 279, 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: not well-formed (invalid token): line 1, column 0
parsing arguments

When I tried the same in a Windows machine with SNAP 5.0 I got the same error. I did not try to run through gpt yet. Could this be a solution?

Thanks in advance



could you specify if you are using the most recent S2 file format ? This has been released a few weeks ago and might not be supported by the software.

stefan adriaensen

Dear Stefan,

I have the same problem with iCOR (Windows + Snap 6.0) regardless which S2 file format is used.

Hope this can be solved. Thanks in advance.

Kind regards,

Hello Grit,

I’m a bit lost in what version you are using. To make it clear : icor is only supported through Snap 5.0, regardless you are using Windows or Linux.
The most recent version of S2 imagery is also not supported.
Both will be considered in an eventual update. (to be scheduled)
Please also make shure python 2.7 is correctly installed (cfr. manual)

Don’t hesitate to contact further if problems persist.


I tried S2A with old and new naming convention and S2B and it didnt work

The format of the Sentinel-2 L1C data has changed slightly since 23 October 2017. iCOR does not yet support this new data format. However iCOR should work on data acquired before this date. iCOR only works for SNAP5.0. Python 2.7 and , for Windows, VS2015 redistributables needs to be installed.
In case issues remain, you can send us ( ) the execution output, so we can have a closer look to the issue.

Best regards