<?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: Stand alone ArcInfo Use? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553992#M43297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think it has to be a stand-alone script.&amp;nbsp; You're on track, but if you already have a license checked out, you'll get the AlreadyInitialized msg.&amp;nbsp; So it runs in a 'process'....so, what I had to do was end the currently running script (that checks out ArcInfo by default) and specifically import ArcView (I have no ArcEditor licenses) before importing arcpy.&amp;nbsp; That's the ticket.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...by the way, I tried del ArcInfo; del arcpy as an attempt to 'un-initialize' and that didn't work...ending the thread in order to start a new one killed the process effectively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 15:13:25 GMT</pubDate>
    <dc:creator>T__WayneWhitley</dc:creator>
    <dc:date>2014-04-07T15:13:25Z</dc:date>
    <item>
      <title>Stand alone ArcInfo Use?</title>
      <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553991#M43296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;At my organization, we have tons of ArcEditor licenses available and everyone is at that license level. We just purchased one ArcInfo license with the hopes that this can by checked out at certain times to use in tools in scripts that when we require ArcInfo tools. I have been reading over some of the documentation, and I cannot quite figure out how to use ArcInfo in a script. Here is my initial test:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import arcinfo&amp;nbsp; Traceback (most recent call last): &amp;nbsp; File "&amp;lt;pyshell#0&amp;gt;", line 1, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import arcinfo &amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcinfo.py", line 18, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; gp.setProduct("ArcInfo") RuntimeError: ERROR 999999: Error executing function. &amp;gt;&amp;gt;&amp;gt; import arceditor &amp;gt;&amp;gt;&amp;gt; import arcinfo &amp;gt;&amp;gt;&amp;gt; import arcpy &amp;gt;&amp;gt;&amp;gt; arcpy.ProductInfo() u'ArcEditor' &amp;gt;&amp;gt;&amp;gt; arcpy.SetProduct('ArcInfo') u'AlreadyInitialized'&amp;nbsp;&amp;nbsp; # here it says ArcInfo has already been initialized, yet I still am not able to use the near tool &amp;gt;&amp;gt;&amp;gt; pnts = r'C:\TEMP\PermitTest\Wtr_Val.shp' &amp;gt;&amp;gt;&amp;gt; hyd = r'C:\TEMP\PermitTest\Wtr_Hyd.shp' &amp;gt;&amp;gt;&amp;gt; arcpy.Near_analysis(pnts, pnts)&amp;nbsp; Traceback (most recent call last): &amp;nbsp; File "&amp;lt;pyshell#7&amp;gt;", line 1, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Near_analysis(pnts, hyd) &amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\analysis.py", line 794, in Near &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 (Near).&amp;nbsp; &amp;gt;&amp;gt;&amp;gt; arcpy.CheckProduct('ArcInfo') u'Unavailable'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I have been reading this [url=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000z000000]page[/url" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000z000000]page[/url&lt;/A&gt;&lt;SPAN&gt;] and it says that if the return value for the SetProduct is "AlreadyInitialized", then the license has already been set in the script. This does not appear to be the case, or the more likely scenario is that I am not doing this correctly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the help docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;Legacy:&lt;BR /&gt;&lt;BR /&gt;The product level should be set by importing the appropriate product module (arcinfo, arceditor, arcview, arcserver, arcenginegeodb, arcengine) prior to importing arcpy. The SetProduct function is a legacy function and cannot set the product once arcpy has been imported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I cannot import arcpy until I import the right module...I cannot directly import arcinfo as shown above (I'm assuming because I haven't initialized an instance of ArcInfo???). It does let me import arcinfo after I import arceditor though. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone had experience with temporarily setting the product to ArcInfo while a script is executing? Also, after the change to ArcInfo is successful, do I need to reset the product back to ArcEditor? How do I do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 14:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553991#M43296</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-07T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stand alone ArcInfo Use?</title>
      <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553992#M43297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think it has to be a stand-alone script.&amp;nbsp; You're on track, but if you already have a license checked out, you'll get the AlreadyInitialized msg.&amp;nbsp; So it runs in a 'process'....so, what I had to do was end the currently running script (that checks out ArcInfo by default) and specifically import ArcView (I have no ArcEditor licenses) before importing arcpy.&amp;nbsp; That's the ticket.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...by the way, I tried del ArcInfo; del arcpy as an attempt to 'un-initialize' and that didn't work...ending the thread in order to start a new one killed the process effectively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:13:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553992#M43297</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2014-04-07T15:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Stand alone ArcInfo Use?</title>
      <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553993#M43298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just tried as a complete stand alone script and it still fails with the "tool is not licensed" error.&amp;nbsp; The first snippet I posted was&amp;nbsp; also "stand alone" as I was using the IDLE interactive window, not the python window within ArcCatalog or ArcMap (with no Arc sessions open).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from the help docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Tip:&lt;BR /&gt;&lt;BR /&gt;The setting of the product and extensions is only necessary within stand-alone scripts. If you are running tools from the Python window or using script tools, the product is already set from within the application, and the active extensions are based on the Extensions dialog box. &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not know how to "un-initialize" ArcEditor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcinfo
import arcpy

arcpy.SetProduct('ArcInfo')
arcpy.ProductInfo()

cb = r'C:\TEMP\UtilityTest.gdb\Stm_Cb'
mh = r'C:\TEMP\UtilityTest.gdb\Stm_Mh'

arcpy.Near_analysis(cb, mh)
print 'done'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to just start with importing arcinfo again and that fails no matter what, unless I import arceditor first.&amp;nbsp; I think I am missing something here...It just seems to default to ArcEditor no matter what...There has got to be a way outside of going into our ArcGIS Administrator and explicitly change to ArcInfo there...I want to avoid that since this ArcInfo license will be shared between 6 people.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:56:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553993#M43298</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T23:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Stand alone ArcInfo Use?</title>
      <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553994#M43299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Caleb, I noticed in your initial post that the &lt;/SPAN&gt;&lt;STRONG&gt;arcpy.CheckProduct('ArcInfo')&lt;/STRONG&gt;&lt;SPAN&gt; line toward the bottom yields a return of &lt;/SPAN&gt;&lt;STRONG&gt;u'Unavailable'&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; Could it be that that the ArcInfo license is already in use by someone else at the moment?&amp;nbsp; I believe that if a license is not or cannot be explicitly set (possibly due to it not being currently available), then the license initialized will be issued using the highest available license level at that time.&amp;nbsp; In your case, perhaps the ArcEditor is simply the "next best" available license which isn't suitable for the tool you're trying to run.&amp;nbsp; Do you think this could be the issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553994#M43299</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2014-04-07T16:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Stand alone ArcInfo Use?</title>
      <link>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553995#M43300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks William...Yeah I think the license is indeed in use somehow because I tried this as a batch file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
cd C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin
SET ESRI_SOFTWARE_CLASS=Professional
arcmap
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And when it starts to open ArcMap at the ArcInfo level, I get the message that all ArcInfo licenses are in use.&amp;nbsp; However, no one in our department is using it right now.&amp;nbsp; My guess is the GIS Manager maybe set his license to ArcInfo for testing after he upgraded our license manager this weekend and forgot to switch back to ArcEditor.&amp;nbsp; He is out of the office today so I think I'll have to wait till tomorrow to get to the bottom of this.&amp;nbsp; Thanks William and Wayne!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stand-alone-arcinfo-use/m-p/553995#M43300</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T23:56:40Z</dc:date>
    </item>
  </channel>
</rss>

