Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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!)

I was hoping anyone else has a workaround/fix? Thank you for your time!

I have installed 10.1 Service Pack 1. I have checked and enabled all the extensions. Furthermore, I have the advanced ArcInfo version.

share|improve this question
You can have ArcGIS for Desktop Advanced without Spatial Analyst being licensed - have you checked to see whether your organisation has purchased and been licensed for Spatial Analyst? – PolyGeo Mar 11 '13 at 2:43
Yup, I just checked ArcGIS Administrator to verify that Spatial Analyst indeed has the "yes, Authorized" next to it. Hmph. – M.g. Mar 11 '13 at 8:56
Is this a standalone script? If so, are you running it as 64-bit or 32-bit? Since you have SP1 installed, it is possible to use either. I have run into situations where one computer would run a 64-bit script while another would not (even though same hardware specs and mirrored installs). – blord-castillo Mar 12 '13 at 20:42
Well my computer is 64-bit. But is that 32/64 bit compatibility something sporadic with different systems? I'll try running the script on another computer with GIS... thanks :) – M.g. Mar 14 '13 at 22:29
What does arcpy.CheckExtension("Spatial") return? – Kirk Kuykendall Mar 20 '13 at 4:15

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
share|improve this answer
thanks for the help! I tried it, no luck :( – M.g. Mar 11 '13 at 22:20
it works for mee – Mounaim Mar 5 '14 at 16:07

Wrap the part of your code that needs spatial analyst extension as follows

arcpy.CheckOutExtension("spatial") your code arcpy.CheckInExtension("spatial")

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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