OTB Python API : problem with UpdateParameters() for TrainVectorClassifier app
Description
My python scripts use TrainVectorClassifier application : it cannot set up the cfield value (neither the features "feat") and fails.
It seems that the UpdateParameters() does not work properly for this application.
The other applications (Sample Selection, Sample Extraction, etc.) work fine.
Steps to reproduce
Here are some simple commands to reproduce. My "samples" file contains an integer field "code".
>>> app = otbApplication.Registry.CreateApplication("SampleExtraction")
>>> app.SetParameterString("in",image_stack)
>>> app.SetParameterString("vec",samples)
>>> app.UpdateParameters()
>>> app.GetChoiceKeys("field")
('id', 'code', 'originfid')
>>> app.SetParameterString("field","code")
-> This works fine !!
>>> app = otbApplication.Registry.CreateApplication("TrainVectorClassifier")
>>> app.SetParameterString("io.vd",samples)
>>> app.SetParameterString("io.out",rf_model)
>>> app.UpdateParameters()
>>> app.GetChoiceKeys()
()
>>> app.SetParameterString("cfield","code")
Traceback (most recent call last): File "", line 1, in File "/home/otb/OTB/lib/python3/otbApplication.py", line 2530, in SetParameterString return _otbApplication.Application_SetParameterString(self, parameter, value, hasUserValueFlag) RuntimeError: Exception thrown in otbApplication Application_SetParameterString: /home/otbval/dashboard/otb/src/Modules/Wrappers/ApplicationEngine/src/otbWrapperListViewParameter.cxx:141: itk::ERROR: ListViewParameter(0x556d1d854370): Cannot find code
Configuration information
OTB 6.6.1 python 3 or develop version, with Python 3.