Questions tagged [stopiteration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
492 views

Use update cursor in arcpy to count number of points within each polygon

I have two shapefiles. One contains many points across a state. The other is all the counties within the state. I would like to do two things: use a cursor to count how many points are in each county ...
user avatar
  • 169
3 votes
1 answer
734 views

arcpy.da.UpdateCursor "iteration not started" when using pairwise iteration through cursor

Without getting too much into the context of this workflow, I'm trying to find whether a stream segment is flowing in the right direction. If the "FROM_NODE" or the "TO_NODE" values of two adjacent ...
user avatar
14 votes
1 answer
1k views

How to access a deleted features attributes (before committing)

I have a signal setup for a feature deletion event on a layer: self.layer.featureDeleted.connect(self.feature_deleted) When I try and grab an attribute from the deleted feature on the slot, a ...
user avatar
  • 2,616
2 votes
1 answer
553 views

Using update cursor with list of shapefiles?

I'm still pretty new to using cursors. What I'd like to do is create a list of shapefiles. Within those shapefiles I would like to populate a field "NAME" with the shapefile name less the .shp ...
user avatar
  • 622
4 votes
1 answer
12k views

Why does the next() method fail after the last record, using arcpy.da.SearchCursor?

Using the older arcpy.SearchCursor, the next() method would return Nothing once the last record had been passed. Using the newer arcpy.da.SearchCursor, I'm finding that the next() method crashes the ...
user avatar
  • 20.5k