<?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 ExecuteError: Failed to execute. Parameters are not valid error when SelectLayerByAttribute run in Python 2.7 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/executeerror-failed-to-execute-parameters-are-not/m-p/524597#M41120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I am running a line of code in a Python 2.7 environment using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;arcpy.SelectLayerByAttribute_management&lt;/CODE&gt;:&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;fl_haz_selects &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SelectLayerByAttribute_management&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;S_Fld_Haz_Ar&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"\"DFIRM_ID\" = '{}'"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;fipC&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;It runs perfectly fine in Python 3.6. Now I am getting the following errors. What am I doing incorrectly here? Note:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;S_FLD_Haz_Ar&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is a shapefile. Do I just need to make it into a layer? I am trying to avoid making a physical layer.&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote" style="color: #242729; background-color: #fff8dc; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #ffeb8e; margin: 0px 0px 10px; padding: 10px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;Traceback (most recent call last): File "", line 3, in File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7713, in SelectLayerByAttribute raise e ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2018 14:37:34 GMT</pubDate>
    <dc:creator>JustinBridwell2</dc:creator>
    <dc:date>2018-10-24T14:37:34Z</dc:date>
    <item>
      <title>ExecuteError: Failed to execute. Parameters are not valid error when SelectLayerByAttribute run in Python 2.7</title>
      <link>https://community.esri.com/t5/python-questions/executeerror-failed-to-execute-parameters-are-not/m-p/524597#M41120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I am running a line of code in a Python 2.7 environment using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;arcpy.SelectLayerByAttribute_management&lt;/CODE&gt;:&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;fl_haz_selects &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SelectLayerByAttribute_management&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;S_Fld_Haz_Ar&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"\"DFIRM_ID\" = '{}'"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;fipC&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;It runs perfectly fine in Python 3.6. Now I am getting the following errors. What am I doing incorrectly here? Note:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit; padding: 1px 5px;"&gt;S_FLD_Haz_Ar&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is a shapefile. Do I just need to make it into a layer? I am trying to avoid making a physical layer.&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote" style="color: #242729; background-color: #fff8dc; border-width: 0px 0px 0px 2px; border-style: initial initial initial solid; border-color: initial initial initial #ffeb8e; margin: 0px 0px 10px; padding: 10px;"&gt;&lt;P style="border: 0px; font-weight: inherit;"&gt;Traceback (most recent call last): File "", line 3, in File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7713, in SelectLayerByAttribute raise e ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/executeerror-failed-to-execute-parameters-are-not/m-p/524597#M41120</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-10-24T14:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteError: Failed to execute. Parameters are not valid error when SelectLayerByAttribute run in Python 2.7</title>
      <link>https://community.esri.com/t5/python-questions/executeerror-failed-to-execute-parameters-are-not/m-p/524598#M41121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It needs to be a feature layer, but that doesn't mean you have to make a LYR file.&amp;nbsp; Just use &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-feature-layer.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-feature-layer.htm"&gt;Make Feature Layer—Help | ArcGIS Desktop&lt;/A&gt; and look at Code Sample 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 16:08:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/executeerror-failed-to-execute-parameters-are-not/m-p/524598#M41121</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-24T16:08:57Z</dc:date>
    </item>
  </channel>
</rss>

