<?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 Error with Feature Class to Shapefile in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-with-feature-class-to-shapefile-in-python/m-p/535337#M41941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to automate the conversion of several geodatabase feature classes to shapefile.&amp;nbsp; The code below produces a shapefile in the output directory but then it throws this error....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;PYTHON ERRORS:
Traceback info:
&amp;nbsp; File "C:\gtemp\ShareLummiData.py", line 12, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(LummiReservation, OutputDirectory)

Error Info:
object of type 'dict' has no len()

ArcPy ERRORS:&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to duplicate this process for several feature classes.&amp;nbsp; I could put an error handler here to catch the error in ESRI's code but if I do, I will not catch real errors.&amp;nbsp; Any ideas would be helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy, sys, traceback
&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputDirectory = r"C:\gtemp\aa"
&amp;nbsp;&amp;nbsp;&amp;nbsp; LummiReservation = r"Z:\Data\Boundaries\Administrative\Lummi.gdb\TribalBoundaries\LummiReservation"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(LummiReservation, OutputDirectory)


except arcpy.ExecuteError: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the tool error messages 
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = arcpy.GetMessages(2) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return tool error messages for use with a script tool 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Print tool error messages for use in Python/PythonWin 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the traceback object
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; tbinfo = traceback.format_tb(tb)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Concatenate information together concerning the error into a message string
&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return python error messages for use in script tool or Python Window
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(pymsg)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Print Python error messages for use in Python / Python Window
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pymsg + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Mar 2013 19:29:37 GMT</pubDate>
    <dc:creator>GerryGabrisch</dc:creator>
    <dc:date>2013-03-07T19:29:37Z</dc:date>
    <item>
      <title>Error with Feature Class to Shapefile in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-with-feature-class-to-shapefile-in-python/m-p/535337#M41941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to automate the conversion of several geodatabase feature classes to shapefile.&amp;nbsp; The code below produces a shapefile in the output directory but then it throws this error....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;PYTHON ERRORS:
Traceback info:
&amp;nbsp; File "C:\gtemp\ShareLummiData.py", line 12, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(LummiReservation, OutputDirectory)

Error Info:
object of type 'dict' has no len()

ArcPy ERRORS:&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to duplicate this process for several feature classes.&amp;nbsp; I could put an error handler here to catch the error in ESRI's code but if I do, I will not catch real errors.&amp;nbsp; Any ideas would be helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy, sys, traceback
&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputDirectory = r"C:\gtemp\aa"
&amp;nbsp;&amp;nbsp;&amp;nbsp; LummiReservation = r"Z:\Data\Boundaries\Administrative\Lummi.gdb\TribalBoundaries\LummiReservation"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(LummiReservation, OutputDirectory)


except arcpy.ExecuteError: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the tool error messages 
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = arcpy.GetMessages(2) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return tool error messages for use with a script tool 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Print tool error messages for use in Python/PythonWin 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the traceback object
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; tbinfo = traceback.format_tb(tb)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Concatenate information together concerning the error into a message string
&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Return python error messages for use in script tool or Python Window
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(pymsg)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(msgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Print Python error messages for use in Python / Python Window
&amp;nbsp;&amp;nbsp;&amp;nbsp; print pymsg + "\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print msgs
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 19:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-with-feature-class-to-shapefile-in-python/m-p/535337#M41941</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2013-03-07T19:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Feature Class to Shapefile in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-with-feature-class-to-shapefile-in-python/m-p/535338#M41942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd use Feature Class to Feature Class. Feature Class to Shapefile is more for bulk loading.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 19:51:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-with-feature-class-to-shapefile-in-python/m-p/535338#M41942</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-03-07T19:51:05Z</dc:date>
    </item>
  </channel>
</rss>

