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.

  • 1
    'TEXT' is not a valid field name? What is your feature class type? Perhaps you'll have better results not using a SQL reserved keyword like "TEXT_Val" see gis.stackexchange.com/questions/123736/…. According to resources.arcgis.com/en/help/main/10.2/index.html#//… the parameters go feature class, existing field, new name, new alias.. there's nothing there about the type. – Michael Stimson Jun 25 '15 at 0:51
  • Michael is right. Simply change "TEXT" to "newfieldname". – Farid Cheraghi Jun 25 '15 at 0:57
  • You referred to the Add FieldManagement doc – Vince Jun 25 '15 at 0:58
  • @MichaelMiles-Stimson I removed that to avoid confusion - it still fails with the same error message if I give a new field name. In fact I only want to change the alias but that's a separate question.... – Stephen Lead Jun 25 '15 at 0:59
  • 1
    @StephenLead Alter fields is relatively new (10.2.2 I think) - what version are you using? Whichever it is would not explain the error message but might help shine some light. – PolyGeo Jun 25 '15 at 1:04

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 ================================
  • Yep, that's pretty much was I was doing (unsuccessfully) in the original test. Looks like it's a problem with my installation, and/or a bug at 10.2. Thanks for verifying. – Stephen Lead Jun 25 '15 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.