2022-04-07 04:53:26 (INFO) [pyOTB] Init. S2_ESA product 2022-04-07 04:53:26 (INFO) [pyOTB] Input type is a directory 2022-04-07 04:53:26 (INFO) [pyOTB] Product is not of type s2 (Exception: Exception thrown in otbApplication Application_SetParameterString: /src/otb/otb/Modules/Wrappers/ApplicationEngine/src/otbWrapperChoiceParameter.cxx:168: itk::ERROR: ChoiceParameter(0x2e9a8b0): Invalid parameter value 'change' given for parameter '-mode') Traceback (most recent call last): File "predict.py", line 45, in <module> processor = crga_processor(il_s1after, il_s1before, il_s1, il_s2after, il_s2before, in_s2, dem, crga_savedmodel, File "/opt/working/decloud/production/crga_processor.py", line 74, in crga_processor images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} File "/opt/working/decloud/production/crga_processor.py", line 74, in <dictcomp> images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} File "/opt/working/decloud/production/crga_processor.py", line 74, in <listcomp> images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} AttributeError: 'NoneType' object has no attribute 'get_raster_10m' otbuser@f6a7ab15cd19:/opt/working$
Issue with S2_ESA product inference.
Error:
2022-04-07 04:53:26 (INFO) [pyOTB] Init. S2_ESA product 2022-04-07 04:53:26 (INFO) [pyOTB] Input type is a directory 2022-04-07 04:53:26 (INFO) [pyOTB] Product is not of type s2 (Exception: Exception thrown in otbApplication Application_SetParameterString: /src/otb/otb/Modules/Wrappers/ApplicationEngine/src/otbWrapperChoiceParameter.cxx:168: itk::ERROR: ChoiceParameter(0x2e9a8b0): Invalid parameter value 'change' given for parameter '-mode') Traceback (most recent call last): File "predict.py", line 45, in <module> processor = crga_processor(il_s1after, il_s1before, il_s1, il_s2after, il_s2before, in_s2, dem, crga_savedmodel, File "/opt/working/decloud/production/crga_processor.py", line 74, in crga_processor images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} File "/opt/working/decloud/production/crga_processor.py", line 74, in <dictcomp> images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} File "/opt/working/decloud/production/crga_processor.py", line 74, in <listcomp> images = {k: [product.get_raster_10m() for product in products] for k, products in products_dic.items()} AttributeError: 'NoneType' object has no attribute 'get_raster_10m' otbuser@f6a7ab15cd19:/opt/working$
Line 299 of decloud/production/products.py reads:
mnnodata.SetParameterString('mode', 'change')
From the docs: https://www.orfeo-toolbox.org/CookBook-7.0/Applications/app_ManageNoData.html?highlight=mode%20changevalue%20new. The following fixes the issue.
mnnodata.SetParameterString('mode', 'changevalue')