Don't know how to get rid of that message?
input_shp = fc arr = arcpy.Array() with arcpy.da.UpdateCursor(input_shp,['FID','SHAPE@']) as cur: extents = [] for row in cur: ext = row[1].extent p0 = ext.lowerLeft; p1 = ext.upperRight print('Extent of shape... {}: '.format(row[0])) print(' X min/max {}, {}'.format(ext.XMin,ext.XMax)) Xmin = round((ext.XMin), 0) print (Xmin) row.setValue(fld_xmin, Xmin) print ( ' X min, {}'.format(ext.XMin)) curs.updateRow(row) print(' Y min/max {}, {}'.format(ext.YMin,ext.YMax)) arr.add(p0) arr.add(p1) mp = arcpy.Multipoint(arr) print('Extent of all {}'.format(mp.extent))
I believe you need to change "row.setValue(fld_xmin,Xmin)" to row[1].setValue(fld_xmin,Xmin)
I think you are having copy and paste issues
curs.updateRow(row)
where is curs defined?
I used cur in my response to your previous post What means: TypeError: 'Row' object does not support indexing ??? which still isn't closed and builds upon my code