inputField = arcpy.ListFields(inputLayer, inputFieldName)[0] fieldType = inputField.type
Did you look over Esri Support 10.2 (10.2.1, 10.2.2) ? Seeing nothing on the ArcGIS 10.2.2 Issues Addressed List appears related to this issue, I suspect no patch or hotfix was issued at 10.2.1 for it.
In terms of upgrades and when it was addresses exactly, I don't know, but you could peruse the issues addressed lists for the releases since 10.2.1 to 10.5:
(I know, nice path/URL standardization on Esri's part)
I got the same result in 10.2.1--small integer instead of GUID. Is there a patch to fix this bug (or is it not worth the bother, just wait to get upgraded)?
Might be fixed in 10.5, but with 10.2 with Sql Server backend enterprise gdb the issue occurs.
A.J.
What is the back-end data store? SQL Server, Oracle, PostgreSQL?
I did a quick check using ArcGIS 10.5 with an enterprise geodatabase in SQL Server, and the results are correct with ArcPy Describe.
I'm seeing this same error with 10.2.1, seems like a bug, here's the result from the describe function
>>> for fld in desc.fields:... print(fld.name + " " + fld.type)... OBJECTID OIDCOMMENTS StringNAME StringYEARESTABLISHED DateMXPARENTLOC StringCREATEEDITOR StringCREATEDATE DateLASTEDITOR StringLASTEDITDATE DateShape GeometryGlobalID SmallIntegerShape.STArea() DoubleShape.STLength() Double>>>
but the field shows as a GlobalId type in ArcCatalog
desc.globalIDFieldName desc.hasGlobalID
Yes but the string is registered with the geodatabase, it does not necessarily have to be the value stored in the field.
I'm not sure exactly how GUIDs work but I'm assuming the actual field value is just a reference to a value stored in the geodatabase, similar to a domain.
# Begin bug patch of Guid showing as ShortInt rows = arcpy.SearchCursor(layer) for row in rows: TestString = str(row.getValue(fieldName)) # use str() in case this really is a Short if (TestString[0] == "{"): # a "{" character has no business in a *real* Short valueDelimiter = "'" # End bug patch of Guid showing as ShortInt
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.