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:
print(x[0]);
and the error just show:
\Users\Jay\PycharmProjects\learn\venv\Scripts\python.exe
/Users/Jay/PycharmProjects/learn/search.py
Traceback (most recent call last):
File "D:/Users/Jay/PycharmProjects/learn/search.py", 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

I wonder what I do wrong
Please help me, thank you