<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: arcpy.AlterField() Error 99999 - fail to rename all fields with their alias? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223287#M65885</link>
    <description>&lt;P&gt;You can't have spaces or dashes in the field name.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/technical-article/000005588" target="_blank" rel="noopener"&gt;&amp;nbsp;legal field names&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 13:10:39 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-10-19T13:10:39Z</dc:date>
    <item>
      <title>arcpy.AlterField() Error 99999 - fail to rename all fields with their alias?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223259#M65884</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to rename the fields of a feature class with their alias name, but I get an error message ERROR 99999.&lt;/P&gt;&lt;P&gt;I use notebook in ArcGIS PRo 2.9.3&lt;/P&gt;&lt;P&gt;Any ideas why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;inFc = "A4_Moorkulisse_2022"
fields = arcpy.ListFields(inFc)

for f in fields:
   
    print (f.name + " - " + f.aliasName)
    
    if f.aliasName in ("OBJECTID", "SHAPE"):
        
        continue
    
    else:
        arcpy.management.AlterField(inFc, f.name, f.aliasName, f.aliasName)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;print output:&lt;/P&gt;&lt;P&gt;A4_Moorkulisse_2022.OBJECTID - OBJECTID&lt;/P&gt;&lt;P&gt;A4_Moorkulisse_2022.SHAPE - SHAPE&lt;/P&gt;&lt;P&gt;A4_Moorkulisse_2022.A3_Moorkulisse_2022_A2_Moorkulisse_2022_A1_Moorkulisse_2022_SP_R - Ref_Prozent&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;ExecuteError&lt;/SPAN&gt;: ERROR 999999: Beim Werkzeug ist ein unerwarteter Fehler aufgetreten. Wenden Sie sich an den technischen Support von Esri (http://esriurl.com/support), und ziehen Sie die Fehlerhilfe zu Rate, die Informationen zu möglichen Lösungen oder Problemumgehungen enthält.
Fehler beim Ausführen von (AlterField).&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Oct 2022 12:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223259#M65884</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-10-19T12:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AlterField() Error 99999 - fail to rename all fields with their alias?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223287#M65885</link>
      <description>&lt;P&gt;You can't have spaces or dashes in the field name.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/technical-article/000005588" target="_blank" rel="noopener"&gt;&amp;nbsp;legal field names&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 13:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223287#M65885</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-10-19T13:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AlterField() Error 99999 - fail to rename all fields with their alias?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223296#M65886</link>
      <description>&lt;P&gt;Ah Ok, thank you for your answer.&lt;/P&gt;&lt;P&gt;But it wasn't me who puts points in the field name, it is caused throught several arcpy.managment.AddJoin and then copy features processes .... so I don't know how to avoid the points?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 13:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223296#M65886</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-10-19T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.AlterField() Error 99999 - fail to rename all fields with their alias?</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223316#M65888</link>
      <description>&lt;P&gt;If I use this it seems to work, convert to string:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.AlterField(inFc, str(f.name), str(f.aliasName), str(f.aliasName))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thank you JeffK for the hint with the legal field names ...&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 13:49:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-alterfield-error-99999-fail-to-rename-all/m-p/1223316#M65888</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2022-10-19T13:49:26Z</dc:date>
    </item>
  </channel>
</rss>

