<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I am Having Issues with ERROR 000732 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379302#M29918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would put some print statements in to validate that the paths to your input and output data are correct.&amp;nbsp; That usually slips me up at first when creating new python scripts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Feb 2016 18:14:56 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2016-02-24T18:14:56Z</dc:date>
    <item>
      <title>I am Having Issues with ERROR 000732</title>
      <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379301#M29917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to run a nested for loop to clip habitat types by Marine Protected Area (MPA) region offshore California.&amp;nbsp;&amp;nbsp; When running the code below I receive error 000732 (red text).&amp;nbsp; Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; File "C:\Python27\ArcGIS10.3\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec codeObject in __main__.__dict__&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; File "E:\BlueCarbon\GIS\Script\MPARegionClip.py", line 19, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(fc, reg, op_FC)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\analysis.py", line 56, in Clip&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;ERROR 000732: Clip Features: Dataset CentralCoastProj.shp does not exist or is not supported&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;Failed to execute (Clip).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Set Variables&lt;/P&gt;&lt;P&gt;hab_Workspace = "E:\\BlueCarbon\\GIS\\Workspace\\habproj "&lt;/P&gt;&lt;P&gt;regWorkspace = "E:\\BlueCarbon\\GIS\\Workspace\\IndRegProj\\"&lt;/P&gt;&lt;P&gt;tWorkspace = "E:\\BlueCarbon\\GIS\\Workspace\\habproj_regions"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;env.workspace = regWorkspace&lt;/P&gt;&lt;P&gt;region = arcpy.ListFeatureClasses("")&lt;/P&gt;&lt;P&gt;env.workspace = hab_Workspace&lt;/P&gt;&lt;P&gt;FClist = arcpy.ListFeatureClasses("")&lt;/P&gt;&lt;P&gt;print FClist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for fc in FClist:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for reg in region:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; op_FC = tWorkspace + "\\" + fc + reg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(fc, reg, op_FC)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379301#M29917</guid>
      <dc:creator>WinnMcEnery3</dc:creator>
      <dc:date>2016-02-24T18:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: I am Having Issues with ERROR 000732</title>
      <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379302#M29918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would put some print statements in to validate that the paths to your input and output data are correct.&amp;nbsp; That usually slips me up at first when creating new python scripts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:14:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379302#M29918</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2016-02-24T18:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: I am Having Issues with ERROR 000732</title>
      <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379303#M29919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would agree with Michael, by the looks of it the shapefile at least can't be found.&amp;nbsp; You may want to verify all the files used in the clip using &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/exists.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/exists.htm"&gt;Exists—Help | ArcGIS for Desktop&lt;/A&gt; prior to&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/clip.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/clip.htm"&gt;Clip—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 19:26:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379303#M29919</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-24T19:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: I am Having Issues with ERROR 000732</title>
      <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379304#M29920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're running into issues because you can only have one workspace environment at a time. You set the workspace to the region folder. The region list is populated with the names (not full paths) of the feature classes in the region workspace folder. Then, you switch the workspace to the hab workspace folder. The FClist is populated with feature class names (not full paths) of the feature classes in the hab workspace folder. Your loops cycle through the feature class names (not full paths) in your lists. Finally, your clip tool is run against two feature class names (not full paths). Since the tool is provided with feature class names (not full paths) it looks for feature classes in the workspace environment folder - your hab folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most direct route I see to a solution is to store the full path in your lists, some thing like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import os
... arcpy.env.workspace = r'C:\junk'
... region = [os.path.join(arcpy.env.workspace,fc) for fc in arcpy.ListFeatureClasses("")]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379304#M29920</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T17:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: I am Having Issues with ERROR 000732</title>
      <link>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379305#M29921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow that makes complete sense and thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 20:19:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-having-issues-with-error-000732/m-p/379305#M29921</guid>
      <dc:creator>WinnMcEnery3</dc:creator>
      <dc:date>2016-02-24T20:19:09Z</dc:date>
    </item>
  </channel>
</rss>

