Why does arcpy's Alter Field return “The tool is not licensed”?

Why does arcpy's Alter Field return “The tool is not licensed”?

According to the help file, the ALTER FIELD command is available at any license level.

ArcGIS for Desktop Basic: Yes

Why am I getting a license error when trying to rename a field alias on a sample file geodatabase featureclass?

> arcpy.Describe(u"e:/test.gdb/testFC").fields[2].name > u'oldfieldname' > arcpy.AlterField_management(u"e:/test.gdb/testFC", "oldfieldname", "newfieldname" ,"newaliasname") > ExecuteError: Failed to execute. Parameters are not valid. > ERROR 000824: The tool is not licensed.

This is a brand new, standard, empty featureclass which I just created for the purposes of this test.

I have no idea why you would receive that error but to move forward I would try running the test code below (with values from your own feature class) from IDLE (or your own IDE).

It worked for me using ArcGIS 10.3.1 for Desktop.

import arcpy oldFieldName = arcpy.Describe("C:/temp/test.gdb/testFC").fields[4].name oldFieldAlias = arcpy.Describe("C:/temp/test.gdb/testFC").fields[4].aliasName print oldFieldName print oldFieldAlias arcpy.AlterField_management("C:/temp/test.gdb/testFC", oldFieldName, "NewField" ,"NewAlias") newFieldName = arcpy.Describe("C:/temp/test.gdb/testFC").fields[4].name newFieldAlias = arcpy.Describe("C:/temp/test.gdb/testFC").fields[4].aliasName print newFieldName print newFieldAlias

Output was:

>>> ================================ RESTART ================================ >>> OldField OldAlias NewField NewAlias

Watch the video: Boss Theme - The Legend of Zelda: Links Awakening Remake Music