Issue with TrainImageClassifier in QGIS

Hello,

I executed the TrainImageClassifier in QGIS on Ubuntu 20.04, and I encountered the following error:

QGIS Version: 3.12.3-București

Code Revision: 8234261527

Qt Version: 5.12.8

GDAL Version: 3.0.4

GEOS Version: 3.8.0-CAPI-1.13.1

Proj Version: Rel. 6.3.1, February 10th, 2020

Algorithm processing…

Starting algorithm ‘TrainImagesClassifier’…

Input parameters:

{‘io.il’: [‘/home/obstetar/Documents/dzetsaka/v_sen2.tif’], ‘io.vd’: [‘/home/obstetar/Documents/dzetsaka/classes.gpkg|layername=classes’], ‘io.valid’: ‘’, ‘io.imstat’: ‘/home/obstetar/Documents/dzetsaka/cis.xml’, ‘io.out’: ‘TEMPORARY_OUTPUT’, ‘io.confmatout’: ‘TEMPORARY_OUTPUT’, ‘cleanup’: True, ‘sample.mt’: 1000, ‘sample.mv’: 1000, ‘sample.bm’: 1, ‘sample.vtr’: 0.5, ‘sample.vfn’: ‘classe’, ‘elev.dem’: ‘/home/obstetar/sen2agri/srtm’, ‘elev.geoid’: ‘’, ‘elev.default’: 0, ‘classifier’: ‘knn’, ‘classifier.knn.k’: 32, ‘rand’: 0}

2020-06-03 16:36:38 (FATAL): itk::ERROR: Failed to open GDALDataset file /home/obstetar/Documents/dzetsaka/classes.gpkg|layername=classes:

Execution completed in 0.31 seconds

Results:

{‘io.confmatout’: ‘/tmp/processing_wlodQt/b0659d84d0fd49a9b370014a5840992f/io_confmatout.file’,
‘io.out’: ‘/tmp/processing_wlodQt/93be2142492a47449ad3217da452c2f9/io_out.file’}

Loading result layers…

Algorithm ‘TrainImagesClassifier’ completed

Hi

it looks like you use the otb version that comes in Ubuntu (apt install otb-bin?) it uses GDAL 3.0.4 it seems there is a problem with the gpkg driver which comes with that version of gdal, i’ll check on a docker image if I encounter the problem. Can you try with the official package which includes GDAL 3.4 and the correct gpkg driver?

Best regards