<?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: Erase tool: Cannot create output in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/erase-tool-cannot-create-output/m-p/108278#M8351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this is your only problem, but think your shapefile name is too long--- according to the below shapefile specification, it must adhere to an 8.3 convention, i.e. 8 alphanumeric characters for the name portion (excluding the extension)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your error, the following output name is quoted, which obviously exceeds this limitation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;anthropogenic_temp_25832.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"All file names adhere to the 8.3 naming convention. The main file, the index file, and the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dBASE file have the same prefix. The prefix must start with an alphanumeric character&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(a�??Z, 0�??9), followed by zero or up to seven characters (a�??Z, 0�??9, _, -)."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf"&gt;http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geoprocessing considerations for shapefile output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geodata » Data types&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//005600000013000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//005600000013000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000210: Cannot create output ... WORKAROUND&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/58946-ERROR-000210-Cannot-create-output-...-WORKAROUND"&gt;http://forums.arcgis.com/threads/58946-ERROR-000210-Cannot-create-output-...-WORKAROUND&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Jun 2013 14:10:17 GMT</pubDate>
    <dc:creator>T__WayneWhitley</dc:creator>
    <dc:date>2013-06-09T14:10:17Z</dc:date>
    <item>
      <title>Erase tool: Cannot create output</title>
      <link>https://community.esri.com/t5/python-questions/erase-tool-cannot-create-output/m-p/108277#M8350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what follows are my very first steps in Python, so my mistake might be easy to find. I have 22 Shapefiles, some of the overlap and I want to clean this using the erase function on every shapefile with all others sequently as erase features, however I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
#! /usr/bin/env python
# -*- coding: utf-8 -*-

# muss ausgeführt werden mit: "C:\Python27\ArcGISx6410.1\python.exe"
# Hilfe zu Funktionen: e.g. help("glob.glob")
# current directory: print os.getcwd()
import os, glob, sys, arcpy, re
from arcpy import env
arcpy.env.overwriteOutput = True

os.chdir("D:/R_working_directory/Connectivity/Ausgangsshapes/integrate")
wdir = "D:/R_working_directory/Connectivity/Ausgangsshapes/integrate/"
shapes = glob.glob("./*.shp")
for j in list(xrange(len(shapes))): 
 erases = shapes[:j] + shapes[(j + 1):]
 input = shapes&lt;J&gt;.split(".")[1]
 input = input.split("\\")[1]
 input = input + ".shp"
 output = wdir + input.split("_")[0] + "_temp_" + input.split("_")[1]
 for x in list(xrange(len(erases))):
&amp;nbsp; erase = erases&lt;X&gt;.split("\\")[1]
&amp;nbsp; arcpy.Erase_analysis(in_features = wdir + input, erase_features = erase, out_feature_class = output, cluster_tolerance = 0)
&amp;nbsp; os.remove(wdir + input) # remove the old file
&amp;nbsp; os.renames(old = output, new = wdir + input) # rename produced file to the name of the old one
exit()
&lt;/X&gt;&lt;/J&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this is the error I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;D:\py_Files&amp;gt;C:\Python27\ArcGISx6410.1\python.exe erase_ArcGIS.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "erase_ArcGIS.py", line 22, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Erase_analysis(in_features = wdir + input, erase_features = erase, out&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_feature_class = output, cluster_tolerance = 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\analysis.py", line&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 205, in Erase&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcgisscripting.ExecuteError: ERROR 000210: Cannot create output D:\R_working_di&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rectory\Connectivity\Ausgangsshapes\integrate\anthropogenic_temp_25832.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Erase).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been trying to solve this for several hours now, but obviously I miss something important. Any help would be very much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ludwig&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 20:31:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/erase-tool-cannot-create-output/m-p/108277#M8350</guid>
      <dc:creator>LudwigHilger</dc:creator>
      <dc:date>2013-06-07T20:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Erase tool: Cannot create output</title>
      <link>https://community.esri.com/t5/python-questions/erase-tool-cannot-create-output/m-p/108278#M8351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this is your only problem, but think your shapefile name is too long--- according to the below shapefile specification, it must adhere to an 8.3 convention, i.e. 8 alphanumeric characters for the name portion (excluding the extension)...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your error, the following output name is quoted, which obviously exceeds this limitation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;anthropogenic_temp_25832.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"All file names adhere to the 8.3 naming convention. The main file, the index file, and the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dBASE file have the same prefix. The prefix must start with an alphanumeric character&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(a�??Z, 0�??9), followed by zero or up to seven characters (a�??Z, 0�??9, _, -)."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf"&gt;http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geoprocessing considerations for shapefile output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geodata » Data types&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//005600000013000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//005600000013000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000210: Cannot create output ... WORKAROUND&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/58946-ERROR-000210-Cannot-create-output-...-WORKAROUND"&gt;http://forums.arcgis.com/threads/58946-ERROR-000210-Cannot-create-output-...-WORKAROUND&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 14:10:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/erase-tool-cannot-create-output/m-p/108278#M8351</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-06-09T14:10:17Z</dc:date>
    </item>
  </channel>
</rss>

