Error when l2w_mask=False

Technical questions about ACOLITE
Post Reply
thibaut
Posts: 7
Joined: Fri Jul 13, 2018 8:33 am

Error when l2w_mask=False

Post by thibaut »

Hi Quinten,

Thank you for developing and sharing acolite, it's such a great tool !

I think I've noticed an unwanted behaviour when trying to process an image without masking.
I added "l2w_mask=False" in my settings, and I get the following error message:

Code: Select all

File "/home/earthlab/thibaut/acolite/acolite/acolite/acolite/acolite_l2w.py", line 1128, in acolite_l2w
    if l2_flags is not None:
UnboundLocalError: local variable 'l2_flags' referenced before assignment
For now I fixed this by adding "'l2_flags' in locals() and " at line 1128 of acolite_l2w.py.
Was it actually a bug or did I get something wrong? If you have a proper fix it would be be welcome!

Thanks in advance,
Thibaut
quinten
Posts: 1021
Joined: Tue Mar 03, 2015 8:13 am

Re: Error when l2w_mask=False

Post by quinten »

Hi Thibaut

Thanks for reporting this, it will be fixed in the next release.

Quinten
Post Reply