<?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: Arcpy Generate Attachment Match Table - RuntimeError: Object: Error in executing tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575255#M73539</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;that was exactly it! Really appreciate the info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First time I've run into that being an issue...will keep that in mind for the future&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2025 12:04:35 GMT</pubDate>
    <dc:creator>MichaelFowler1</dc:creator>
    <dc:date>2025-01-14T12:04:35Z</dc:date>
    <item>
      <title>Arcpy Generate Attachment Match Table - RuntimeError: Object: Error in executing tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575216#M73537</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm attempting to create a python script with one of the steps being creating a attachment match table and then adding an attachment to a fc whenever someone creates a new product.&lt;/P&gt;&lt;P&gt;When doing the process manually I have zero issues, but when I try and script the step I keep getting this error: "RuntimeError: Object: Error in executing tool".&lt;/P&gt;&lt;P&gt;When I have the code segment in a try/except statement it runs without actually outputting the 'out_match_table'. Even when I copy/paste the working code from running the tool from ArcGIS Pro it still gives me the error. Currently using ArcGIS Pro 3.2.1&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
arcpy.env.overwriteOutput = True

working_gdb = r'path to my gdb'

aprx = arcpy.mp.ArcGISProject('CURRENT')
layout = aprx.listLayouts('Layout')[0]

map_frame = layout.listElements("mapframe_element", "Map Frame")[0]

extent = map_frame.camera.getExtent()
polygon = extent.polygon

# append
product_ingest_polygon = f'{working_gdb}\\Product_Ingest'
arcpy.management.Append([polygon], product_ingest_polygon, "NO_TEST")

# generate attachment match table
in_dataset = product_ingest_polygon
in_folder = r"path to product folder"
out_match_table = f"{working_gdb}\\Product_Ingest_match_table"
in_key_field = "Prod_Name"
in_file_filter="",
in_use_relative_paths='RELATIVE',
match_pattern="EXACT"

arcpy.management.GenerateAttachmentMatchTable(in_dataset, in_folder, out_match_table, in_key_field, in_file_filter, in_use_relative_paths, match_pattern)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 06:09:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575216#M73537</guid>
      <dc:creator>MichaelFowler1</dc:creator>
      <dc:date>2025-01-14T06:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Generate Attachment Match Table - RuntimeError: Object: Error in executing tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575240#M73538</link>
      <description>&lt;P&gt;I suspect the commas generating a tuple may be an issue&lt;/P&gt;&lt;LI-CODE lang="python"&gt;working_gdb = r'path to my gdb'

product_ingest_polygon = f'{working_gdb}\\Product_Ingest'

in_dataset = product_ingest_polygon
in_folder = r"path to product folder"
out_match_table = f"{working_gdb}\\Product_Ingest_match_table"
in_key_field = "Prod_Name"
in_file_filter="",
in_use_relative_paths='RELATIVE',
match_pattern="EXACT"

in_file_filter
('',)
in_use_relative_paths
('RELATIVE',)
# ----- versus ---------------------
in_dataset = product_ingest_polygon
in_folder = r"path to product folder"
out_match_table = f"{working_gdb}\\Product_Ingest_match_table"
in_key_field = "Prod_Name"
in_file_filter=""
in_use_relative_paths='RELATIVE'
match_pattern="EXACT"

in_file_filter
''
in_use_relative_paths
'RELATIVE'&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jan 2025 10:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575240#M73538</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-01-14T10:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Generate Attachment Match Table - RuntimeError: Object: Error in executing tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575255#M73539</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;that was exactly it! Really appreciate the info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First time I've run into that being an issue...will keep that in mind for the future&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 12:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-generate-attachment-match-table-runtimeerror/m-p/1575255#M73539</guid>
      <dc:creator>MichaelFowler1</dc:creator>
      <dc:date>2025-01-14T12:04:35Z</dc:date>
    </item>
  </channel>
</rss>

