So I am trying to figure out how to get the date for a selected feature using the spatial location using arcpy. I keep running into an issue where the MakeFeatureLayer keeps returning an error and I am not sure as to why. I followed several examples and yet I still keep getting an error. I would greatly appreciate any help with this.
workspace = r'Database Connections\Some Connection.sde'
fcs = 
walk = arcpy.da.Walk(workspace, datatype="FeatureClass")
Dist_LL = "Database Connections\Some.sde\FeatureClass"
for dirpath, dirnames, filenames in walk:
for filename in filenames:
for fc in fcs:
geometryType = arcpy.Describe(fc).shapeType
if geometryType == 'Point':
#Get feature class name
fcsname = os.path.basename(fc)
name = os.path.splitext(fcsname)
y = name.lstrip('.')
#For fields in some feature classes
fields = ["OID@", "LANDDISTRICT", "LANDLOT"]
#Make feature layers
for row in arcpy.da.SearchCursor(fc, fields):
if row is None:
arcpy.SelectLayerByLocation_management (fc_layer, 'INTERSECT', Dist_LL_lyr)
select_records = arcpy.da.SearchCursor(Dist_LL_lyr)
elif row is None: