I have a problem with my for loop.
In an array profile_nrs all the numbers are stored I want to create points for in an existing feature class. When I print these values I get the expected nr of values (and also the correct values). Now I am creating points with an insertCursor and print in the end which point nr was added. I get all the (in this case) 18 points printed. But when I look into my file I receive only 17 points. Any advise is highly appreciated. I don't see any potential cause for this "misbehavior". My feeling tells me that it must not be looping through the numbers itself but through the index but then I wouldn't get nr 18 printed, would I?
Here the main part of the module:
<SPAN class="keyword token">for</SPAN> profile <SPAN class="keyword token">in</SPAN> profile_nrs<SPAN class="punctuation token">:</SPAN>
newPoint<SPAN class="operator token">=</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>InsertCursor<SPAN class="punctuation token">(</SPAN>points<SPAN class="punctuation token">,</SPAN> fillnames<SPAN class="punctuation token">)</SPAN>
newPoint<SPAN class="punctuation token">.</SPAN>insertRow<SPAN class="punctuation token">(</SPAN>fillValues<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"point "</SPAN><SPAN class="operator token">+</SPAN>str<SPAN class="punctuation token">(</SPAN>profile<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">+</SPAN><SPAN class="string token">" added to All_points"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Inside the for loop I have a couple of other loops to get the fillnames and fillvalues but I don't see anywhere how this could influence the output. Especially if it says it added nr 18 but obviously it didn't...
Thanks in advance for helping me with this.