<?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 Running SelectLayerByAttribute outside ESRI environment Gives ERROR 000824 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/running-selectlayerbyattribute-outside-esri/m-p/269336#M20747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows: Windows Server 2008 R2 SP1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Product: Arc GIS Desktop 10 (ArcInfo), ArcGIS Server Enterprise Advanced 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python: 2.6 32bit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not facing this issue in either ArcMap or Geoprocessing Server under ArcGIS Server I did not even needed to initialize any licences in these environment as it is already set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I am trying to run same code code using PythonWin, Python Command Line, Python Visual Studio Tools 2.0 I get&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;ERROR 000824 &lt;/STRONG&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;The tool is not licensed.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I have went through &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000z000000" rel="nofollow noopener noreferrer" target="_blank"&gt;this article&lt;/A&gt;&lt;SPAN&gt; tried using &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003v000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ProductInfo&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003r000000" rel="nofollow noopener noreferrer" target="_blank"&gt;CheckProduct&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; legacy &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003w000000" rel="nofollow noopener noreferrer" target="_blank"&gt;SetProduct&lt;/A&gt;&lt;SPAN&gt; and even importing arcinfo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure what I am missing to make ArcGIS Server or even ArcInfo licensed in Python.:confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color:#FF7700;"&gt;&lt;STRONG&gt;import&lt;/STRONG&gt;&lt;/SPAN&gt; arcinfo&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color:#FF7700;"&gt;&lt;STRONG&gt;import&lt;/STRONG&gt;&lt;/SPAN&gt; arcpy&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; mapDocument &lt;SPAN style="color:#66CC66;"&gt;=&lt;/SPAN&gt; arcpy.mapping.MapDocument(&lt;SPAN style="color:#483D8B;"&gt;"C:&lt;SPAN style="color:#000099;"&gt;&lt;STRONG&gt;\&lt;/STRONG&gt;&lt;/SPAN&gt;Python.mxd"&lt;/SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; Layer &lt;SPAN style="color:#66CC66;"&gt;=&lt;/SPAN&gt; arcpy.mapping.ListLayers(mapDocument&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"Boundaries"&lt;/SPAN&gt;)[&lt;SPAN style="color:#FF4500;"&gt;0&lt;/SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; arcpy.SelectLayerByAttribute_management(Layer&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"OBJECTID = 1"&lt;/SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN style="font-style:italic;"&gt;Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 4259, in SelectLayerByAttribute
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (SelectLayerByAttribute).&lt;/SPAN&gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.CheckProduct("arcinfo")u'NotLicensed'
&amp;gt;&amp;gt;&amp;gt; arcpy.ProductInfo()
u'ArcInfo'
&amp;gt;&amp;gt;&amp;gt; arcpy.SetProduct("arcinfo")
u'CheckedOut'
&amp;gt;&amp;gt;&amp;gt; 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:11:00 GMT</pubDate>
    <dc:creator>Muhammad_Abdul_HadiMuhammad_Ab</dc:creator>
    <dc:date>2021-12-11T13:11:00Z</dc:date>
    <item>
      <title>Running SelectLayerByAttribute outside ESRI environment Gives ERROR 000824</title>
      <link>https://community.esri.com/t5/python-questions/running-selectlayerbyattribute-outside-esri/m-p/269336#M20747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows: Windows Server 2008 R2 SP1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Product: Arc GIS Desktop 10 (ArcInfo), ArcGIS Server Enterprise Advanced 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python: 2.6 32bit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not facing this issue in either ArcMap or Geoprocessing Server under ArcGIS Server I did not even needed to initialize any licences in these environment as it is already set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I am trying to run same code code using PythonWin, Python Command Line, Python Visual Studio Tools 2.0 I get&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;ERROR 000824 &lt;/STRONG&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;The tool is not licensed.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I have went through &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000z000000" rel="nofollow noopener noreferrer" target="_blank"&gt;this article&lt;/A&gt;&lt;SPAN&gt; tried using &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003v000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ProductInfo&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003r000000" rel="nofollow noopener noreferrer" target="_blank"&gt;CheckProduct&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; legacy &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000003w000000" rel="nofollow noopener noreferrer" target="_blank"&gt;SetProduct&lt;/A&gt;&lt;SPAN&gt; and even importing arcinfo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure what I am missing to make ArcGIS Server or even ArcInfo licensed in Python.:confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color:#FF7700;"&gt;&lt;STRONG&gt;import&lt;/STRONG&gt;&lt;/SPAN&gt; arcinfo&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color:#FF7700;"&gt;&lt;STRONG&gt;import&lt;/STRONG&gt;&lt;/SPAN&gt; arcpy&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; mapDocument &lt;SPAN style="color:#66CC66;"&gt;=&lt;/SPAN&gt; arcpy.mapping.MapDocument(&lt;SPAN style="color:#483D8B;"&gt;"C:&lt;SPAN style="color:#000099;"&gt;&lt;STRONG&gt;\&lt;/STRONG&gt;&lt;/SPAN&gt;Python.mxd"&lt;/SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; Layer &lt;SPAN style="color:#66CC66;"&gt;=&lt;/SPAN&gt; arcpy.mapping.ListLayers(mapDocument&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"Boundaries"&lt;/SPAN&gt;)[&lt;SPAN style="color:#FF4500;"&gt;0&lt;/SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN style="color:#000000;"&gt;&lt;SPAN style="color:#66CC66;"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; arcpy.SelectLayerByAttribute_management(Layer&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN style="color:#66CC66;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color:#483D8B;"&gt;"OBJECTID = 1"&lt;/SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN style="font-style:italic;"&gt;Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 4259, in SelectLayerByAttribute
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (SelectLayerByAttribute).&lt;/SPAN&gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.CheckProduct("arcinfo")u'NotLicensed'
&amp;gt;&amp;gt;&amp;gt; arcpy.ProductInfo()
u'ArcInfo'
&amp;gt;&amp;gt;&amp;gt; arcpy.SetProduct("arcinfo")
u'CheckedOut'
&amp;gt;&amp;gt;&amp;gt; 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:11:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/running-selectlayerbyattribute-outside-esri/m-p/269336#M20747</guid>
      <dc:creator>Muhammad_Abdul_HadiMuhammad_Ab</dc:creator>
      <dc:date>2021-12-11T13:11:00Z</dc:date>
    </item>
  </channel>
</rss>

