Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Error 000824 - Feature to Point

$
0
0
I did post in this discussion forum but felt like this was more of a Question/Answer forum post.

ArcGIS for Desktop 10.2.1
Python 2.7

Receiving "Tool is not licensed" error when running this code:

Code:

# Import arcpy module
import arcpy
from arcpy import env
import os

# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

os.environ['ESRI_SOFTWARE_CLASS']='Professional' #Added based on forum suggestion
arcpy.CheckOutExtension('Spatial') #Added based on forum suggestion

Input = "C:\\GIS_DATA\\FGDB.gdb\\InputPolygons"
Input_Layer = "Feature_Layer"
Output = "C:\\GIS_DATA\\FGDB.gdb\\OutputPoints"

try:
  arcpy.MakeFeatureLayer_management(Input, Input_Layer, "", "", "field alias VISIBLE NONE")
  arcpy.FeatureToPoint_management(Input_Layer, Output, "CENTROID")

except:
  print arcpy.GetMessages()

Result:
Code:

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

Never had this issue before. Migrating update scripts from one version of ArcGIS (10.0 SP5) to another (10.2.1).

Any help appreciated.

Viewing all articles
Browse latest Browse all 2485

Trending Articles