<div dir="ltr">Solved by myself :<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">serviceParameter={'INPUT':network,'START_POINTS':depart,'STRATEGY':0,'TRAVEL_COST':travel_cost,'DEFAULT_DIRECTION':2,'DEFAULT_SPEED':5.0,'TOLERANCE':0.0,'INCLUDE_BOUNDS':False,'OUTPUT_LINES':'memory:','DIRECTION_FIELD' : '','VALUE_BACKWARD' : '', 'VALUE_BOTH' : '', 'VALUE_FORWARD' : '' }<br><br>r=processing.run('qgis:serviceareafromlayer',serviceParameter,feedback=feedback)<br>l=r['OUTPUT_LINES']<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>for f in l.getFeatures():<br>    sink.addFeature(f) <br></div></blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-03 9:33 GMT+02:00 Jean-Baptiste Desbas <span dir="ltr"><<a href="mailto:jb.desbas@gmail.com" target="_blank">jb.desbas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br><br></div>I want to use the serviceareafromlayer alg in a python script, but it give me an error :<br>

<p style="margin:0px;text-indent:0px;white-space:pre-wrap"><span style="color:rgb(255,0,0)">Traceback (most recent call last):<br>File "C:/PROGRA~1/QGIS3~1.0/apps/<wbr>qgis/./python/plugins\<wbr>processing\algs\qgis\<wbr>ServiceAreaFromLayer.py", line 264, in processAlgorithm<br>fields, QgsWkbTypes.MultiLineString, network.sourceCrs())<br>Exception: unknown</span></p><br></div>I can successfuly lunch that alg with the same input layer from the GUI, so what's wrong with my code ?<br><br></div>Here is the code : <a href="http://paste.debian.net/1023040/" target="_blank">http://paste.debian.net/<wbr>1023040/</a><br><br></div>Thanks,<br></div>
</blockquote></div><br></div>