I am using Win server 2012 R2 and ArcGIS 10.2.2.
goal: match field names across featureclasses/tables in gdb
I thought that using python to retrieve field names from all featureclasses/tables in a gdb and then convert them to hex would allow me to easily compare and match similar features/tables for a data management exercise. I was wrong.
here's the code:
import os arcpy.env.workspace= r"C:\Users\$user$\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\connection.sde" feature_classes = arcpy.ListFeatureClasses() for fc in feature_classes: fieldnames = arcpy.ListFields(fc) print fc for f in fieldnames: print (hex(f.name))
I get this error: Traceback (most recent call last): File "", line 10, in TypeError: hex() argument can't be converted to hex
Print statements are there to help me keep track. According to esri's documentation. ListFields(fc).name should return a string. However it seems to be a object.