I try to run the Zonal Statistic as a Table through ArcPy and it gives me:

ERROR 000824: The tool is not licensed.

Here is the doc for the function: http://resources.arcgis.com/en/help/main/10.1/index.html#//009z000000w8000000

I have tried including the line where it checks for my Spatial Analyst extension:


but that just leaves the script running for a long time, way longer than it should (10 minutes+ on a 250Mb raster!)

Do you have a workaround/fix?

I have installed 10.1 Service Pack 1. I have checked and enabled all the extensions.

Furthermore, I have the Advanced/ArcInfo license level.


2 Answers 2


Wrap the part of your code that needs Spatial Analyst extension as follows


#your code


By checking out licenses only when you need them and checking them in, you won't hold up licences if other people need to use them. This is useful in a setting where there are fewer licenses than the people who use them in a network environment.


You may need to import the arcinfo module for the script to be able to use the spatial analyst extension. Your import statement at the beginning of your script should look like this:

import arcpy, arcinfo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.