AnsweredAssumed Answered

name cursor is not defined

Question asked by LarryAdgate on Apr 17, 2017
Latest reply on Apr 17, 2017 by rastrauch

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

Outcomes