<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I want to run a model from Python code in QGIS 3.0x (recent nightly).</p>
<p>Here is my code:</p>
<p>-------------------------------</p>
<p>def exportAnlagenAlsExcel():<br />    # Prepare processing framework<br />    from qgis.core import QgsProcessingFeatureSourceDefinition<br />    from processing.core.Processing import Processing<br />    Processing.initialize()<br />    import processing<br />    parameters = {'vfewsanlagen': QgsProcessingFeatureSourceDefinition('Anlage', True), 'native:orderbyexpression_1:Ausgabedatei' : 'C:/temp/ews_anlagen.xlsx' }<br />    processing.run("model:Anlagen-Export",parameters,feedback=None)<br />    #open Resultatesfile in MS Excel<br />    command = 'start C:\\temp\\ews_anlagen.xlsx'<br />    os.system(command)<br />    iface.messageBar().pushInfo("Information",u"ExcelExport fertig")</p>
<p>-------------------</p>
<p>However, when running the script I get an error with a message I can't interpret or solve:</p>
<p>---------------</p>
<p>2018-04-25T08:09:51 WARNING Traceback (most recent call last):</p>
<p>File "<string>", line 45, in exportAnlagenAlsExcel</p>
<p>File "C:/Programme/OSGeo4W64/apps/qgis-rel-dev/./python/plugins\processing\tools\general.py", line 84, in run</p>
<p>return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)</p>
<p>File "C:/Programme/OSGeo4W64/apps/qgis-rel-dev/./python/plugins\processing\core\Processing.py", line 193, in runAlgorithm</p>
<p>raise QgsProcessingException(msg)</p>
<p>_core.QgsProcessingException: There were errors executing the algorithm.</p>
<p>---------------------------</p>
<p>Do you know what is wrong in my Python code above? I am pretty sure that the very same code ran in an older version of QGIS 3.</p>
<p>Thank you for your help,</p>
<p>Andreas</p>

</body></html>