AnsweredAssumed Answered

SearchCursor object() takes no parameters

Question asked by cheyihung on Dec 6, 2018
Latest reply on Dec 6, 2018 by cheyihung

Hi I'm just learning the function of SearchCursor


this is my code here

import arcpy

points = r'D:\GIS\turto\pop.shp'

with arcpy.da.SearchCursor(points,['iso_a2', 'adm0_a3']) as citycursor:
    for x in citycursor:

and the error just show:
D:\Users\Jay\PycharmProjects\learn\venv\Scripts\python.exe D:/Users/Jay/PycharmProjects/learn/
Traceback (most recent call last):
File "D:/Users/Jay/PycharmProjects/learn/", line 10, in <module>
with arcpy.da.SearchCursor(points,['iso_a2', 'adm0_a3']) as citycursor:
TypeError: object() takes no parameters

Process finished with exit code 1

I followed the tutorial of this one

6 - Search Cursors - Arcgis Scrpting with Python - YouTube 

and I checked the syntax and other examples, all didnt help

the sitauation

I wonder what I do wrong


Please help me, thank you