Referring to ArcGIS help it seems possible to check out advanced desktop license. But typing
arcpy.CheckOutExtension('ArcInfo')
gives
Unrecognized extension code ArcInfo
Referring to ArcGIS help it seems possible to check out advanced desktop license. But typing
arcpy.CheckOutExtension('ArcInfo')
gives
Unrecognized extension code ArcInfo
As the documentation states:
"SetProduct is a legacy; importing modules needs to be done before importing arcpy".
http://resources.arcgis.com/en/help/main/10.2/index.html#/SetProduct/03q30000000v000000/
The script might go something like this:
import arcinfo
import arcpy
if arcpy.CheckProduct("ArcInfo") == "Available":
execute code
else:
print "Error message"
Your issue stems from the fact that ArcInfo isn't an extension.
Try using:
arcpy.SetProduct('arcInfo')
It is customary to use a Try:Except block when setting a product level.
Try using:
class LicenseException(Exception):
pass
try:
status = arcpy.SetProduct('arcInfo')
if status == 'CheckedOut':
pass
if status == 'AlreadyInitialized':
pass
if status == 'NotLicensed':
raise LicenseException(status) # Extends Exception
if status == 'Failed':
raise LicenseException(status)
except LicenseException:
# Handle the exception accordingly.
except:
# Handle unexpected exceptions.
Look here for more information: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/SetProduct/000v0000003w000000/
import arcinfo
beforeimport arcpy
to checkout that product (which is not an extension).