Skip to main content
Post Closed as "Duplicate" by PolyGeo
Readability
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Arcpy error ERROR 000824: The tool is not licensed from arcpy.gp.ExtractByMask_sa()?

I am running a code that uses arcpy.sa.ExtractByMask but it is saying the tool isn't licensed.

I know I have spatial analyst licensed and the tool works fine within arcmap itself. Anyone ever come acrossArcMap but when I try to run this?

Edit code snippet:

import arcpy

arcpy.CheckExtension('Spatial')

returns 'Available'

Edit:

When I run the extract by mask tool for 1 image in arcmap the snippet returned is:

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically# Correctedwhich Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

I then try to run this in python:

importreturns arcpy'Available'

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

and the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

Has anyone encountered this before?

Arcpy error: tool not licensed

I am running a code that uses arcpy.sa.ExtractByMask but it is saying the tool isn't licensed.

I know I have spatial analyst licensed and the tool works fine within arcmap itself. Anyone ever come across this?

Edit:

arcpy.CheckExtension('Spatial')

returns 'Available'

Edit:

When I run the extract by mask tool for 1 image in arcmap the snippet returned is:

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

I then try to run this in python:

import arcpy

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

and the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

ERROR 000824: The tool is not licensed from arcpy.gp.ExtractByMask_sa()?

I know I have spatial analyst licensed and the tool works fine within ArcMap but when I try to run this code snippet:

import arcpy

arcpy.CheckExtension('Spatial')  # which returns 'Available'

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

Has anyone encountered this before?

edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
added 2 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13

I am running a code that uses arcpy.sa.ExtractByMaskarcpy.sa.ExtractByMask but it is saying the tool isn't licensed.

I know I have spatial analyst licensed and the tool works fine within arcmap itself. Anyone ever come across this?

Edit:

arcpy.CheckExtension('Spatial')

returns 'Available'

Edit:

When I run the extract by mask tool for 1 image in arcmap the snippet returned is:

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

I then try to run this in python:

import arcpy

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

and the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

I am running a code that uses arcpy.sa.ExtractByMask but it is saying the tool isn't licensed.

I know I have spatial analyst licensed and the tool works fine within arcmap itself. Anyone ever come across this?

Edit:

arcpy.CheckExtension('Spatial')

returns 'Available'

Edit:

When I run the extract by mask tool for 1 image in arcmap the snippet returned is:

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

I then try to run this in python:

import arcpy

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

and the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

I am running a code that uses arcpy.sa.ExtractByMask but it is saying the tool isn't licensed.

I know I have spatial analyst licensed and the tool works fine within arcmap itself. Anyone ever come across this?

Edit:

arcpy.CheckExtension('Spatial')

returns 'Available'

Edit:

When I run the extract by mask tool for 1 image in arcmap the snippet returned is:

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

I then try to run this in python:

import arcpy

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

and the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)
deleted 1231 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading
added 872 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading
added 15 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading
added 1227 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading
added 65 characters in body
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading
Source Link
spotter
  • 101
  • 1
  • 5
  • 13
Loading