inTable = "C:/***/Bbuffers.shp" inField = "CITY_TOWN" rows = arcpy.SearchCursor(inTable) #row = rows.next for row in rows: City = row.getValue(inField) #Error thrown here #row = rows.next()
OS: Windows 7, 64-bitIDE: PyScripterArcGIS: 10.0 - Concurrent Use license accessed remotelyHi,I am receiving the following error when trying to run a basic while-loop over feature class rows: 'function' object has no attribute "getValue". My code is:import arcpyfrom arcpy import envenv.workspace = "C:/***/TestScripts_UsingNHL"env.overwriteOutput = TrueinTable = "C:/***/Bbuffers.shp"inField = "CITY_TOWN"rows = arcpy.SearchCursor(inTable)row = rows.nextwhile row: City = row.getValue(inField) #Error thrown here row = rows.next()print "Finished!"The field "CITY_TOWN" does exist, and it is spelled correctly. I get the same error even if I try to print instead of getValue: print row.CITY_TOWN. This seems basic, but I cannot find a fix. Any help/suggestions would be appreciated. Thanks!
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.