<?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: ExecuteError: ERROR 000210: Cannot create output Intersect Arcpy 2.7 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/executeerror-error-000210-cannot-create-output/m-p/1297473#M67886</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Well your problem is that your newfile name is ending up as "C:\Users\Brubisgeo\Downloads\teste_1\intersected_C:\Users\Brubisgeo\Downloads\clipar tudo\BR_Municipios_2021\BR_Municipios_2021.shp" which seems to have joined your input on the end of your output to make a broken path, although from looking at your code I can't really tell why. I would recommend adding an arcpy.AddMessage() statement for your rename_shp and newfile to see what values they have before they're input into your intersect. It looks like the fc variable in the "intersectedo_{}".format(fc)" part is somehow putting the whole shapefile file path in there.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 06:05:12 GMT</pubDate>
    <dc:creator>JoshuaSharp-Heward</dc:creator>
    <dc:date>2023-06-09T06:05:12Z</dc:date>
    <item>
      <title>ExecuteError: ERROR 000210: Cannot create output Intersect Arcpy 2.7</title>
      <link>https://community.esri.com/t5/python-questions/executeerror-error-000210-cannot-create-output/m-p/1297255#M67881</link>
      <description>&lt;P&gt;Hi everyone! I'm trying run this code in arcpy 2.7 for ArcMap 10.8, but appears a error&amp;nbsp; when write the output files. This code intersects multiple shapefiles from a folders and subfolders and calculate the area exporting the excel from this files intersected.I have another version this code for Arcgis Pro in arcpy 3.7 and runs with no problem. The error is:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\Brubisgeo\Downloads\intersect.py", line 20, in &amp;lt;module&amp;gt;&lt;BR /&gt;arcpy.Intersect_analysis([fc, inter], newfile, "ALL", "", "INPUT")&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\analysis.py", line 334, in Intersect&lt;BR /&gt;raise e&lt;BR /&gt;ExecuteError: ERROR 000210: Cannot create output C:\Users\Brubisgeo\Downloads\teste_1\intersected_C:\Users\Brubisgeo\Downloads\clipar tudo\BR_Municipios_2021\BR_Municipios_2021.shp&lt;BR /&gt;Failed to execute (Intersect).&lt;/P&gt;&lt;P&gt;How can i fix this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;import os&lt;BR /&gt;import arcpy&lt;BR /&gt;inter = arcpy.GetParameterAsText(0)&lt;BR /&gt;input_folder = arcpy.GetParameterAsText(1)&lt;BR /&gt;output_folder = arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput=True&lt;BR /&gt;arcpy.env.workspace = input_folder&lt;/P&gt;&lt;P&gt;list_fcs = arcpy.ListFeatureClasses()&lt;BR /&gt;for root, directory, files in os.walk(input_folder):&lt;BR /&gt;for fc in files:&lt;BR /&gt;if fc.endswith('.shp'):&lt;BR /&gt;rename_shp = "intersectedo_{}".format(fc)&lt;BR /&gt;rename_excel = "calculado_{}.xls".format(os.path.splitext(fc)[0])&lt;BR /&gt;newfile = os.path.join(output_folder,rename_shp)&lt;BR /&gt;newtable = os.path.join(output_folder,rename_excel)&lt;/P&gt;&lt;P&gt;arcpy.Intersect_analysis([fc, inter],newfile,"","","")&lt;BR /&gt;desc = arcpy.Describe(fc)&lt;BR /&gt;geometry = desc.shapeType&lt;BR /&gt;if geometry == 'Polygon':&lt;BR /&gt;fieldName = "NEW_AREA"&lt;BR /&gt;expr ='!shape.area@hectares!'&lt;BR /&gt;arcpy.management.AddField(newfile,fieldName,"DOUBLE")&lt;BR /&gt;arcpy.CalculateField_management(newfile,fieldName,expr,'PYTHON')&lt;BR /&gt;arcpy.TableToExcel_conversion(newfile,newtable)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 08 Jun 2023 17:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/executeerror-error-000210-cannot-create-output/m-p/1297255#M67881</guid>
      <dc:creator>Bruna_Camilly</dc:creator>
      <dc:date>2023-06-08T17:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteError: ERROR 000210: Cannot create output Intersect Arcpy 2.7</title>
      <link>https://community.esri.com/t5/python-questions/executeerror-error-000210-cannot-create-output/m-p/1297473#M67886</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Well your problem is that your newfile name is ending up as "C:\Users\Brubisgeo\Downloads\teste_1\intersected_C:\Users\Brubisgeo\Downloads\clipar tudo\BR_Municipios_2021\BR_Municipios_2021.shp" which seems to have joined your input on the end of your output to make a broken path, although from looking at your code I can't really tell why. I would recommend adding an arcpy.AddMessage() statement for your rename_shp and newfile to see what values they have before they're input into your intersect. It looks like the fc variable in the "intersectedo_{}".format(fc)" part is somehow putting the whole shapefile file path in there.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 06:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/executeerror-error-000210-cannot-create-output/m-p/1297473#M67886</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2023-06-09T06:05:12Z</dc:date>
    </item>
  </channel>
</rss>

