Debugging ERROR 000664 when changing field name with arcpy.AlterField_management()?

المشرف العام

Administrator
طاقم الإدارة
I am trying to change a field name in featureclasses (shapefiles) using AlterField_management, however I receive the following error message:

Runtime error Traceback (most recent call last): File "", line 14, in File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 3332, in AlterField raise e ExecuteError: ERROR 000664: Invalid input: The type of dataset is not supported.

The code:

import arcpy from os import path arcpy.env.overwriteOutput = True arcpy.env.workspace = r'C:\johnny\trial' for fc in arcpy.ListFeatureClasses(): fieldList = arcpy.ListFields(fc) for field in fieldList: #if field.baseName != "NEAR_DIST": arcpy.AlterField_management(fc, 'NEAR_DIST', 'distance', "distance", "DOUBLE")

أكثر...
 
أعلى