<?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: Create Table Failing When Running Script Tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1322081#M68479</link>
    <description>&lt;P&gt;Making it a String parameter worked perfectly. Thanks,&amp;nbsp;&lt;SPAN&gt;Johannes!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2023 13:17:34 GMT</pubDate>
    <dc:creator>KeithMcDermott</dc:creator>
    <dc:date>2023-08-24T13:17:34Z</dc:date>
    <item>
      <title>Create Table Failing When Running Script Tool</title>
      <link>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1321982#M68476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Very new to Python. I created a small script to compare data from two tables and create a third table containing the results of the comparison (a "results_table" that the user will define). It works when I run the code through my IDE, but when running the tool I receive the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 000354: The name contains invalid characters&lt;BR /&gt;Failed to execute (CreateTable).&lt;/P&gt;&lt;P&gt;Here is how I am defining the parameters:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KeithMcDermott_0-1692840153206.png" style="width: 779px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79005i999B4D8EAD528A27/image-dimensions/779x189?v=v2" width="779" height="189" role="button" title="KeithMcDermott_0-1692840153206.png" alt="KeithMcDermott_0-1692840153206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Excerpts from the code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
arcpy.env.overwriteOutput=1

workspace = arcpy.GetParameterAsText(0)
arcpy.env.workspace = workspace

feature_class = arcpy.GetParameterAsText(1)
standards_table = arcpy.GetParameterAsText(2)
feature_id_field = arcpy.GetParameterAsText(3)
s_field = arcpy.GetParameterAsText(4)
results_table = arcpy.GetParameterAsText(5)

# CODE......
arcpy.management.CreateTable(workspace, results_table)&lt;/LI-CODE&gt;&lt;P&gt;Any help would greatly appreciated. Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 01:37:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1321982#M68476</guid>
      <dc:creator>KeithMcDermott</dc:creator>
      <dc:date>2023-08-24T01:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create Table Failing When Running Script Tool</title>
      <link>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1322033#M68477</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-table.htm" target="_blank" rel="noopener"&gt;CreateTable&lt;/A&gt; takes two arguments: The output workspace and the output &lt;STRONG&gt;name&lt;/STRONG&gt;. Your last parameter is a Table, if you get that as text, it returns the table &lt;STRONG&gt;path&lt;/STRONG&gt;. If you use that in CreateTable, it tries to create a table with the complete path as name. This puts illegal characters ("\") into the table name.&lt;/P&gt;&lt;P&gt;If you make the last parameter a String, it should work.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 08:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1322033#M68477</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-08-24T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create Table Failing When Running Script Tool</title>
      <link>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1322081#M68479</link>
      <description>&lt;P&gt;Making it a String parameter worked perfectly. Thanks,&amp;nbsp;&lt;SPAN&gt;Johannes!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 13:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-table-failing-when-running-script-tool/m-p/1322081#M68479</guid>
      <dc:creator>KeithMcDermott</dc:creator>
      <dc:date>2023-08-24T13:17:34Z</dc:date>
    </item>
  </channel>
</rss>

