<?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: RuntimeError: Object: Error in executing tool (in AddJoin) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605758#M47366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Thank you for responding.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;I modified the code and run ok. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2016 18:00:31 GMT</pubDate>
    <dc:creator>G__EricCastillo_Morales</dc:creator>
    <dc:date>2016-03-03T18:00:31Z</dc:date>
    <item>
      <title>RuntimeError: Object: Error in executing tool (in AddJoin)</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605756#M47364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to join attributes from 12 tables to a single layer. This is the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #eb7a3d;"&gt;import&lt;/SPAN&gt; arcpy&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #eb7a3d;"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN style="color: #eb7a3d;"&gt;import&lt;/SPAN&gt; env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Set overwrite option&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = &lt;SPAN style="color: #8b008b;"&gt;True&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.qualifiedFieldNames = &lt;SPAN style="color: #8b008b;"&gt;False&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Set the current workspace.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;env.workspace = &lt;SPAN style="color: #008000;"&gt;r'D:\INSUMOS\INEGI\21 Puebla.mdb'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Set local variables.&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;inFeatures = &lt;SPAN style="color: #008000;"&gt;r'D:\INSUMOS\INEGI\21 Puebla.mdb\JOIN\mNoJoin'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;layerName = &lt;SPAN style="color: #008000;"&gt;'mNoJoin_layer'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;joinField = &lt;SPAN style="color: #008000;"&gt;'CVEGEO'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;outFeature = &lt;SPAN style="color: #008000;"&gt;r'D:\INSUMOS\INEGI\21 Puebla.mdb\JOIN\m_Join'&lt;/SPAN&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;# Create a feature layer from the vegtype featureclass.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.MakeFeatureLayer_management (inFeatures,&amp;nbsp; layerName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Get a list of stand alone tables in the geodatabase and print out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;tableList = arcpy.ListTables(&lt;SPAN style="color: #008000;"&gt;"*manzanas*"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #eb7a3d;"&gt;for&lt;/SPAN&gt; table &lt;SPAN style="color: #eb7a3d;"&gt;in&lt;/SPAN&gt; tableList:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;# Join the feature layer to a tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(layerName, joinField, tableList, joinField)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Copy the layer to a new permanent feature class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.CopyFeatures_management(layerName, outFeature)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;print &lt;SPAN style="color: #008000;"&gt;"Number of tables joined to inFeature: "&lt;/SPAN&gt;,&amp;nbsp; &lt;SPAN style="color: #8b008b;"&gt;len&lt;/SPAN&gt;(tableList)&lt;/P&gt;&lt;P&gt;print &lt;SPAN style="color: #008000;"&gt;"Done."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this from Shell:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&amp;nbsp; File "D:\Eric\python script\AddMultipleJoinToFeature.py", line 24, 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.AddJoin_management(layerName, joinField, tableList, joinField)&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\management.py", line 6110, in AddJoin&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;RuntimeError: Object: Error in executing tool&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;I suppose this a newbie stuff, but I appreciate if you guys help me.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 15:30:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605756#M47364</guid>
      <dc:creator>G__EricCastillo_Morales</dc:creator>
      <dc:date>2016-03-03T15:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Object: Error in executing tool (in AddJoin)</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605757#M47365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric. Your AddJoin isn't working because you are trying to join the whole list of tables instead of just the current table in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Get a list of stand alone tables in the geodatabase and print out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;tableList = arcpy.ListTables(&lt;SPAN style="color: #008000;"&gt;"*manzanas*"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #eb7a3d;"&gt;for&lt;/SPAN&gt; table &lt;SPAN style="color: #eb7a3d;"&gt;in&lt;/SPAN&gt; tableList:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;# Join the feature layer to a tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(layerName, joinField, tableList, joinField)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;# Get a list of stand alone tables in the geodatabase and print out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;tableList = arcpy.ListTables(&lt;SPAN style="color: #008000;"&gt;"*manzanas*"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #eb7a3d;"&gt;for&lt;/SPAN&gt; t &lt;SPAN style="color: #eb7a3d;"&gt;in&lt;/SPAN&gt; tableList:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #e23d39;"&gt;# Join the feature layer to a tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(layerName, joinField, t, joinField)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 17:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605757#M47365</guid>
      <dc:creator>RuthBowers</dc:creator>
      <dc:date>2016-03-03T17:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Object: Error in executing tool (in AddJoin)</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605758#M47366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Thank you for responding.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;I modified the code and run ok. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 18:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-object-error-in-executing-tool-in/m-p/605758#M47366</guid>
      <dc:creator>G__EricCastillo_Morales</dc:creator>
      <dc:date>2016-03-03T18:00:31Z</dc:date>
    </item>
  </channel>
</rss>

