<div dir="ltr"><div>Dear forum</div><div><br></div><div>I need yo stack some rasters using pyqgis</div><div><br></div><div>This is the code I wrote</div><div><br></div><div>import processing<br>from processing.core.Processing import Processing<br>from qgis.core import *</div><div><br></div><div>parameters = {'INPUT': '/home/file1.tif;/home/file2.tif;/home/file3.tif;/home/file4.tif', \<span class="gmail-im"><br>                        'PCT': False, \<br>                        'SEPARATE': False, \<br>                        'NODATA_INPUT': 0, \<br></span>                        'NODATA_OUTPUT': 0, \<span class="gmail-im"><br>                        'OPTIONS': "", \<br>                        'DATA_TYPE': 5, \<br>                        'OUTPUT': '/home/stack.tif'}</span></div><div><div>processing.run ('gdal:merge', parameters)</div><div><br></div><div>but I get this error <br></div><div><br></div><div>Traceback (most recent call last):<span class="gmail-im"><br>  File "/usr/lib/python3.7/code.py", line 90, in runcode<br>    exec(code, self.locals)<br>  File "<input>", line 1, in <module><br>  File "<string>", line 76, in <module><br></span>  File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 106, in run<br>    return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)<br>  File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 137, in runAlgorithm<br>    raise QgsProcessingException(msg)<br>_core.QgsProcessingException: Unable to execute algorithm<br>Incorrect parameter value for INPUT</div><div><br></div><div><br></div><div>I use</div><div><br></div><div>

<table style="margin:0px" width="100%" cellspacing="2" cellpadding="0" border="0" align="center">
<tbody><tr>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">QGIS version</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">3.8.0-Zanzibar</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">QGIS code revision</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><a href="https://github.com/qgis/QGIS/commit/11aff65"><span style="text-decoration:underline;color:rgb(0,0,255)">11aff65</span></a></p></td></tr>
<tr>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Compiled against Qt</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">5.12.2</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Running against Qt</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">5.12.2</p></td></tr>
<tr>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Compiled against GDAL/OGR</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">2.4.0</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Running against GDAL/OGR</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">2.4.0</p></td></tr>
<tr>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Compiled against GEOS</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">3.7.1-CAPI-1.11.1</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">Running against GEOS</p></td>
<td>
<p style="margin:0px;text-indent:0px;white-space:pre-wrap">3.7.1-CAPI-1.11.1 27a5e771</p></td></tr></tbody></table></div><div><br></div><div>Thank you very much<br></div><div><br></div><div>Grazie</div></div></div>