So, I have a script that calculates polylines for well borepaths from CSV directional survey files and then updates the geometry of existing features with that calculated polyline; it also writes a "Y" to a attribute field called "REBUILT" so i know which features have the new updated calculated polyline. I have ran this script at least a dozen times without error. The last time i ran it, it completed with no errors reported, however the geometry was not updated for any of the features BUT the "REBUILT" field was created and written to. To put it simply, the update cursor is updating normal attribute fields but not geometry. Has anyone ran into something like this before? I would post the code here but it is hundreds of lines and is being run on proprietary data that i cannot share.
The snippet below is the bit of the script where the Update Cursor is called:
edit <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>Editor<SPAN class="punctuation token">(</SPAN>workspace<SPAN class="punctuation token">)</SPAN>
edit<SPAN class="punctuation token">.</SPAN>startEditing<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
edit<SPAN class="punctuation token">.</SPAN>startOperation<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">with</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>UpdateCursor<SPAN class="punctuation token">(</SPAN>clean_borepath_shapefile<SPAN class="punctuation token">,</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">"API_Text"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"REBUILT"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"SHAPE@"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> borepath_cursor<SPAN class="punctuation token">:</SPAN>
polylinecount <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN>
<SPAN class="keyword token">for</SPAN> borepath <SPAN class="keyword token">in</SPAN> borepath_cursor<SPAN class="punctuation token">:</SPAN>
api <SPAN class="operator token">=</SPAN> borepath<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">for</SPAN> county<SPAN class="punctuation token">,</SPAN>coordinatesdict <SPAN class="keyword token">in</SPAN> countycoordinatesdict<SPAN class="punctuation token">.</SPAN>iteritems<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">if</SPAN> api <SPAN class="keyword token">in</SPAN> coordinatesdict<SPAN class="punctuation token">:</SPAN>
coordinates <SPAN class="operator token">=</SPAN> coordinatesdict<SPAN class="punctuation token">.</SPAN>get<SPAN class="punctuation token">(</SPAN>api<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> len<SPAN class="punctuation token">(</SPAN>coordinates<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">></SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN>
polyline <SPAN class="operator token">=</SPAN> CreatePolyline<SPAN class="punctuation token">(</SPAN>coordinates<SPAN class="punctuation token">,</SPAN>spatial_reference<SPAN class="punctuation token">)</SPAN>
borepath<SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Y"</SPAN>
borepath<SPAN class="punctuation token">[</SPAN><SPAN class="number token">2</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> polyline
borepath_cursor<SPAN class="punctuation token">.</SPAN>updateRow<SPAN class="punctuation token">(</SPAN>borepath<SPAN class="punctuation token">)</SPAN>
polylinecount <SPAN class="operator token">=</SPAN> polylinecount <SPAN class="operator token">+</SPAN> <SPAN class="number token">1</SPAN>
edit<SPAN class="punctuation token">.</SPAN>stopOperation<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
edit<SPAN class="punctuation token">.</SPAN>stopEditing<SPAN class="punctuation token">(</SPAN><SPAN class="token boolean">True</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
UPDATE: Just ran it again for the 5th or 6th time and it worked. The inputs didn't change, the code didn't change. Utterly baffled.