Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stopiteration]

The tag has no usage guidance.

4
votes
1answer
284 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 ...
3
votes
1answer
511 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 ...
13
votes
1answer
666 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 ...
2
votes
1answer
458 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 ...
3
votes
1answer
9k 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 ...