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 extension. I am using 10.1 and my code is below:
bufferCalc = arcpy.ListFeatureClasses("*.shp") for calc in bufferCalc: NOTE: This space contains calculations for other fields with arcpy.da.UpdateCursor(calc, ("PROJNAME")) as cursor: for shp in arcpy.ListFeatureClasses(): cursor.updateRow(os.path.splitext(shp))
The other calculations I need run smoothly however, the error I get when the cursor is ran states "StopIteration: iteration not started". This has got to be something simple I'm doing wrong but can't seem to figure it out.