The following script is giving me an error message. Any ideas how to make it work and what questions I should I ask myself in the future to remedy the error.
import arcpy
fc="C:/Projects/PythonTesting/GoingPlaces.dbf"
with arcpy.da.SearchCursor(fc, ["STREETNAME"]) as Cursor:
for row in cursor:
print "STREETNAME = {0}".formate(row[0])
Runtime error
Traceback (most recent call last):
File "<string>", line 7, in <module>
NameError: name 'cursor' is not defined
Solved! Go to Solution.
Case sensitive.
...as Cursor:
vs your "for row in cursor:"
Thank You
You welcome. Sometimes a second pair of eyes (or many in the case of geonet) helps.
Don't forget to mark this as answered.