<?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: Python Script not working as Tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298964#M23147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the parameters for the tool?&amp;nbsp; a screen grab or documentation of the parameter, type, etc would be useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Nov 2015 16:17:30 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-11-13T16:17:30Z</dc:date>
    <item>
      <title>Python Script not working as Tool</title>
      <link>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298963#M23146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script that works in python, but when I create a tool for it, it no longer works. I have attached the code, does anybody know what could be wrong? I have also copy and pasted the error I received. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: StreetNames "C:\Users\kziegenfuss\Desktop\PM\Segments Shapefile\Segments.shp" Street C:\Users\kziegenfuss\Desktop\PM\Clip\Clip.shp ROAD_NAME&lt;BR /&gt;Start Time: Fri Nov 13 07:54:58 2015&lt;BR /&gt;Running script StreetNames...&lt;BR /&gt;Failed script StreetNames...&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:\Users\kziegenfuss\AppData\Roaming\ESRI\Desktop10.2\ArcToolbox\My Toolboxes\StreetName.tbx#StreetNames.py", line 29, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 6812, in SelectLayerByLocation&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000368: Invalid input data.&lt;BR /&gt;Failed to execute (SelectLayerByLocation).&lt;/P&gt;&lt;P&gt;Failed to execute (StreetNames).&lt;BR /&gt;Failed at Fri Nov 13 08:02:24 2015 (Elapsed Time: 7 minutes 26 seconds)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 16:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298963#M23146</guid>
      <dc:creator>KellyZiegenfuss2</dc:creator>
      <dc:date>2015-11-13T16:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script not working as Tool</title>
      <link>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298964#M23147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the parameters for the tool?&amp;nbsp; a screen grab or documentation of the parameter, type, etc would be useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 16:17:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298964#M23147</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-13T16:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script not working as Tool</title>
      <link>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298965#M23148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The parameters two shapefiles and a specified field from each shapefile&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 16:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298965#M23148</guid>
      <dc:creator>KellyZiegenfuss2</dc:creator>
      <dc:date>2015-11-13T16:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script not working as Tool</title>
      <link>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298966#M23149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error indicates there is a problem with your inputs for the select layer by location. You need to generate a layer from the buffer in your script. The select layer by location will only take layer files not output features. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#buffer the dissolved Centerlines layer
arcpy.Buffer_analysis ("lyr_dissolved", "buffer", "50 Feet", "", "", "", "")

arcpy.MakeFeatureLayer_management("buffer", "lyr_buffer")

#Delete any centerlines that will not be used
arcpy.SelectLayerByLocation_management("lyr_buffer","INTERSECT","lyr_Segments","","NEW_SELECTION")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-not-working-as-tool/m-p/298966#M23149</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2021-12-11T14:21:19Z</dc:date>
    </item>
  </channel>
</rss>

