Page 1 of 1

luts.py error

Posted: Wed Dec 09, 2020 10:04 am
by lq17865155322
Hello everyone, hello Francois,
I want to process OLCI with polymer v4.13, but when I run the following command

Code: Select all

sudo python polymer_cli.py S3A_OL_1_EFR____20170919T020939_20170919T021239_20180713T211640_0180_022_217_2340_LR2_R_NT_002.SEN3
The processing results are as follows:

Code: Select all

Traceback (most recent call last):
  File "polymer_cli.py", line 11, in <module>
    from polymer.main import run_atm_corr, Level1, Level2
  File "/home/l/polymer-v4.13/polymer/main.py", line 8, in <module>
    from polymer.luts import read_mlut_hdf, Idx
  File "/home/l/polymer-v4.13/polymer/luts.py", line 999
    else f'dim_{next(idim)}'
                            ^
SyntaxError: invalid syntax
I configured the operating environment according to "readme.md" and compiled it with "make all". I am confused about where the problem is.

Thank you!

Re: luts.py error

Posted: Wed Dec 09, 2020 10:57 am
by fsteinmetz
Hello,
I suspect you are using a python version older than 3.6, can you confirm ?
Python 3.6 or newer is required.
Cheers,
François

Re: luts.py error

Posted: Thu Dec 10, 2020 3:06 am
by lq17865155322
Hello Francois,
Thank you so much for your suggestion.
I confirmed that my python version is 3.7.0, and the above error still occurs.
Thank you!

Re: luts.py error

Posted: Thu Dec 10, 2020 9:28 am
by fsteinmetz
Can you check that luts.py has not been modified ?
The line 999 of this file is part of a multi-line statement, and I don't see why there would be an invalid syntax here.
Or double-check that you are not using python2 by accident, I think this might be the most likely issue. Just type $ python --version to check

Re: luts.py error

Posted: Thu Dec 10, 2020 11:36 am
by lq17865155322
Hello Francois,
Thank you so much for your suggestion.
It is indeed due to my negligence that the python version is not configured correctly, and now it can run normally.
Thank you for providing such an excellent atmospheric correction algorithm!
cheers!