Processing S2 scene with 'long file name' in Sen2Cor

Hi All,

Does anyone have experience processing S2 scene that have the old naming style:

S2A_OPER_MTD_SAFL1C_PDMC_20160420T203347_R038_V20160420T132214_20160420T132214.xml

instead of:

MTD_MSIL1C.xml

I managed to read it into Sen2Cor (both SNAP and command line) but was getting an error (see message below) believed to be associated with the naming of the metadata structure.

Thanks.

Product version cannot be read.
14.5 will be used by default, but warnings during validation might occur.
Traceback (most recent call last):
File “C:\Users\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 354, in
sys.exit(main())
File “C:\Users\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 175, in main
if not config.setProductVersion():
File “C:\Users\Downloads\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 4747, in setProductVersion
self.processingBaseline = processingBaseline
UnboundLocalError: local variable ‘processingBaseline’ referenced before assignment

Hi, I just meet the same problem as you. Have you worked out?

Hi, Me too.

depends on what you wanted to do. i think i managed to read it in using the command line, but then got another error message. i wanted to do atmospheric correction, after trying atm. corr. algorithms available at my disposal, i found that polymer works!

you can try change the long path name to something short (I think this works for ENVI), or if you need to read info from the metadata, change the filename(s) to the new naming style