Getting license error when running CreateTopographicContours in stand-alone script

632
2
08-11-2021 09:05 AM
JavierBelo1
New Contributor II

We have a script basically following the one in the tool documentation to create contour lines

CheckOutExtension('Foundation')

CheckOutExtension('Foundation')

topographic.GenerateTopographicContours(in_rasters=DEM,
area_of_interest=aoi_layer,
contour_features=in_contours_features,
elevation_field='Highest Elevation',
contour_subtype='CA010_Elevation_Contour_Line',
scale='1:50,000')

but we are getting this error

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

The parameters we pass are the same than the one we use in ArcGIS Pro where we are not getting any error and the greoprocessing run with no problems

Version ArcGIS Pro 2.8.0

 

0 Kudos
2 Replies
JayantaPoddar
MVP Esteemed Contributor

Generate Topographic Contours requires ArcGIS Desktop Advanced with Production Mapping and ArcGIS Spatial Analyst extension.

Could you also CheckOut the other desired licenses?

Refer the following to view the right way of Checking out an extension for Concurrent-Use licenses. 

CheckOutExtension 

Something like

arcpy.CheckOutExtension("Foundation")
arcpy.CheckOutExtension("Spatial")

 



Think Location
JavierBelo1
New Contributor II

The extensions have been checked out correctly (and we have the correct ArcGIS Pro version). The script use other tools of Topographic Production toolbox and these work with no problem. 

The point is the issue is generated in the stand-alone script and with the same parameters and sources it works with no problem in ArcGIS Pro  

0 Kudos