I'm trying to use “ListSubtypes” function in ArcGIS Python.

It works on 32bit environment (f.e. - Desktop), but it does not work in 64bit (f.e. - Server) and returns IOError without any information – f.e.: “IOError(u'sde_pipe.SCHEMA.feature',)”.

I am using arcpy.CreateDatabaseConnection_management to make connection and setting it with arcpy.env.workspace.

Code snippet:

walk = arcpy.da.Walk(datatype="FeatureClass")
                for root, feature_datasets, feature_classes in walk:
                    for feature_class in feature_classes:
                            subtypes = da.ListSubtypes(os.path.join(root, feature_class))
                            arcpy.AddWarning("Unexpected {} error:{}".format(feature_class, sys.exc_info()[0]))
  • What parameters are you supplying to arcpy.env.workspace? I think you should remove your try/except in any code you present here and while testing so that no error messages are being masked. – PolyGeo Mar 27 '19 at 9:57
  • It does not matter if i setting workspace or not. Tried to set variable workspace = r'c:\Temp\connection.sde' and list subtypes by using subtypes = arcpy.da.ListSubtypes(workspace + "/" + fc1) or subtypes = arcpy.da.ListSubtypes(workspace + "/" + "dbName.SCHEMA.dataSetName" + "/" + fc1) also tried with os.path.join - still returns IOException. Removing try/except does not help to clarify issue. – Kosmo Mar 27 '19 at 10:57

Your Answer

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

Browse other questions tagged or ask your own question.