Greetings,
I am getting an error from a list from a csv that I want to use to loop through features in SDE.
It was working, but is throwing an error now??
envarp_list = ["AirQualityReceptors_Ply", "AirQualityReceptors_Pt", "LandscapeCharacterAreas_Ply", "Viewpoints_Pt","LV_ZTV_Ply", "AssessmentLocationsAll_Pt"]
envarp_list = ["AirQualityReceptors_Ply", "AirQualityReceptors_Pt", "LandscapeCharacterAreas_Ply", "Viewpoints_Pt","LV_ZTV_Ply", "AssessmentLocationsAll_Pt"]
print("LOOP")
fcs = arcpy.ListFeatureClasses("server.gis.*")
for fc in fcs:
for envarp in arcpror1_list:
if fc == envarp:
print(fc)
print(new_name)
arcpy.FeatureClassToFeatureClass_conversion(fc, outLocation, new_name)
else:
print("NOT in list")
print("END")
The list is much longer, it would be good to read directly from the csv file.
Error message is:
SyntaxError Traceback (most recent call last)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\ast.py, in parse:
Line 35: return compile(source, filename, mode, PyCF_ONLY_AST)
SyntaxError: invalid syntax (<string>, line 29)
This was working earlier with a smaller list, really need to read it from the csv, without looping 4 times
Any pointers appreciated.
Clive