<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Dear All,<div><br></div><div>I have a strange phenomena running some code.</div><div>I'm using the processing algorithm <span style="color: rgb(106, 135, 89); background-color: rgb(43, 43, 43); font-family: "DejaVu Sans Mono"; font-size: 12pt;">qgis:pointsalonglines</span></div><pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'DejaVu Sans Mono';font-size:9,0pt;">output = processing.run(<span style="color:#6a8759;">"qgis:pointsalonglines"</span><span style="color:#cc7832;">, </span>{<span style="color:#6a8759;">'INPUT'</span>: poly_to_lines<span style="color:#cc7832;">,<br></span><span style="color:#cc7832;">                                                  </span><span style="color:#6a8759;">'DISTANCE'</span>: spaced_pts_distance<span style="color:#cc7832;">,<br></span><span style="color:#cc7832;">                                                  </span><span style="color:#6a8759;">'START_OFFSET'</span>: <span style="color:#6897bb;">0</span><span style="color:#cc7832;">,<br></span><span style="color:#cc7832;">                                                  </span><span style="color:#6a8759;">'END_OFFSET'</span>: <span style="color:#6897bb;">0</span><span style="color:#cc7832;">,</span>'OUTPUT'<span style="font-size: 12pt;">: </span><span style="font-size: 12pt; color: rgb(106, 135, 89);">'memory:'</span><span style="font-size: 12pt;">})</span><span style="color: rgb(0, 0, 0); font-family: "times new roman", "new york", times, serif; font-size: 12pt;"> </span></pre><div><br></div><div>The output vector should have 3 columns (FID, angle,Distance)</div><div><br></div><div>If I run the code inside the python console plugin (even from a sample code) It works correctly but if I run ti inside my plugin, calling such lines inside a method the output only have 2 columns (distance and angle) so the </div><div><span style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "DejaVu Sans Mono"; font-size: 12pt;">receiver_points_memory_layer = output[</span><span style="font-family: "DejaVu Sans Mono"; font-size: 12pt; color: rgb(106, 135, 89);">'OUTPUT'</span><span style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "DejaVu Sans Mono"; font-size: 12pt;">]</span></div><div><br></div><div>Ant picking the attribute table with:</div><div><span style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "DejaVu Sans Mono"; font-size: 12pt;">receiver_memory_feat[</span><span style="font-family: "DejaVu Sans Mono"; font-size: 12pt; color: rgb(106, 135, 89);">'FID'</span><span style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "DejaVu Sans Mono"; font-size: 12pt;">]</span></div><div><br></div><div>tells me </div><pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'DejaVu Sans Mono';font-size:9,0pt;">attributes = [receiver_points_feat_id, receiver_memory_feat['FID']]<br></pre><div><span style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "DejaVu Sans Mono"; font-size: 12pt;">KeyError: 'FID'</span> </div><div><br></div><div>Where I'm wrong?</div><div><br></div><div>thanks</div><div>Pierluigi</div></div></body></html>