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); and the error just show: D:\Users\Jay\PycharmProjects\learn\venv\Scripts\python.exe D:/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
and I checked the syntax and other examples, all didnt help
I wonder what I do wrong
Please help me, thank you
Please remove the ; at the end of the print statement. I tested a search cursor on your dataset without any errors. What python version are you using? Can you import arcpy from the interactive python IDE environment without errors?
Hi, I can use other arcpy funtions such as search by location, so it means the arcpy in pycharm is imported correctly, right?
I'm using the python 2.7 which came with ArcGIS 10.5
I was wondering what was missing