I'm trying to execute a standalone python script using arcpy and spatial analyst extension. I've arcmap installed with a trial license.

The script is the following:

import arcpy,arcinfo
import sys
import os

def listFcsInGDB(dataset):
    ''' List all Feature Classes in a geodatabase, including inside Feature Datasets '''
    fcs = []
    for fds in arcpy.ListDatasets('','feature') + ['']:
        if (fds == dataset):
            for fc in arcpy.ListFeatureClasses('','',fds):
                fcs.append(os.path.join(fds, fc))
    return fcs

if arcpy.CheckProduct("ArcInfo") == "Available":
   print "available"

if arcpy.CheckExtension("Spatial") == "Available":
    print "License is available"

arcpy.env.workspace = "C:\\Users\\user\\\Desktop\\input.gdb"

fcs = listFcsInGDB("SPlit")

for fc in fcs:
        logFile = open('Log.txt', 'a+')
        logFile.write("Create TIN...\n")
        # Process: Create TIN
        outputFC = fc+"_TIN"
        logFile.write("TIN successfully created. Output FC: " + outputFC + "\n")


When I run the script on my machine, i get the error "ERROR 000824: The tool is not licensed", while running the same script on another machine with a regular license does not return any error.

The script prints "License is available" and running the createTin tool from arcmap does not return any error.

I think the issue is due to the fact that I have old expired trial licenses registered in arcGis administrator, and my standalone script is not able to retrieve the correct (unexpired) license. Does this make sense? How can I make it work?

  • 1
    You're using a 3D Analyst tool, so why do you check out Spatial Analyst? – GISGe Jul 15 '16 at 10:03
  • Thanks, that was the error...but why it works if I run the script from the other machine? – user1071138 Jul 15 '16 at 10:28
  • 1
    These licensing functions are for concurrent use licenses managed by a License Manager, not for single use licenses managed by the ArcGIS Administrator (like your trial license). Your script is using the CU licenses from the LM. You should check how licenses are set on every machine to explain the different behaviour. – GISGe Jul 15 '16 at 10:47