AnsweredAssumed Answered

I am Having Issues with ERROR 000732

Question asked by mcwinn19 on Feb 24, 2016
Latest reply on Feb 24, 2016 by mcwinn19

I am attempting to run a nested for loop to clip habitat types by Marine Protected Area (MPA) region offshore California.   When running the code below I receive error 000732 (red text).  Any help is greatly appreciated.

 

 

 

  File "C:\Python27\ArcGIS10.3\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript

    exec codeObject in __main__.__dict__

  File "E:\BlueCarbon\GIS\Script\MPARegionClip.py", line 19, in <module>

    arcpy.Clip_analysis(fc, reg, op_FC)

  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\analysis.py", line 56, in Clip

    raise e

ExecuteError: Failed to execute. Parameters are not valid.

ERROR 000732: Clip Features: Dataset CentralCoastProj.shp does not exist or is not supported

Failed to execute (Clip).

 

CODE:

import arcpy

from arcpy import env

 

#Set Variables

hab_Workspace = "E:\\BlueCarbon\\GIS\\Workspace\\habproj "

regWorkspace = "E:\\BlueCarbon\\GIS\\Workspace\\IndRegProj\\"

tWorkspace = "E:\\BlueCarbon\\GIS\\Workspace\\habproj_regions"

 

env.workspace = regWorkspace

region = arcpy.ListFeatureClasses("")

env.workspace = hab_Workspace

FClist = arcpy.ListFeatureClasses("")

print FClist

 

for fc in FClist:

    for reg in region:

        op_FC = tWorkspace + "\\" + fc + reg

        arcpy.Clip_analysis(fc, reg, op_FC)

Outcomes