I am trying to figure out why my ArcGIS Pro Python Script Tool with validation fails to open when I insert the block of code in my image.
def initializeParameters(self):
shpFile = r"C:\LPA\Data\ne_10m_admin_0_countries.shp"
self.params[0].filter.list = sorted([row[0] for row in
arcpy.da.SearchCursor(shpFile, "NAME")])
return