I am trying to print out the "datasettype" of some layers that are connected to an Oracle Database via SDE using the datasettype method of Describe. The connection to SDE is encrypted.
Using this simple script:
for lyr in arcpy.mapping.ListLayers(mxd,"",df): if lyr.supports("DATASOURCE"): print arcpy.Describe(lyr.dataSource).datasettype
I am getting the following error:
Runtime error Traceback (most recent call last): File "<string>", line 3, in <module> File "e:\sw_nt\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 1234, in Describe return gp.describe(value) File "e:\sw_nt\arcgis\desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 374, in describe self._gp.Describe(*gp_fixargs(args, True))) IOError: "C:\Documents and Settingsusername\Application Data\ESRI\ArcCatalog\Connection to Test.sde\BASEMAPPING.POPULATION_POINT" does ot exist
My thoughts are that the script needs to connect to the SDE feature class to determine its dataset type. Because the connection to SDE is encrypted, I am thinking that I need to login somehow for the connection string to hit the feature class before determining the dataset type. If I am correct on this, how can I get it so that read the dataset type on an encrypted SDE feature class? If I am not correct, what else might be the issue?
Try it with. datasetType Instead of datasettype. (That is, may just be a typo)
ArcGIS Help (10.2, 10.2.1, and 10.2.2)
my network is down at the moment, so can't test myself.
Thanks for the reply Rebecca. The correct spelling of the method is all lowercase. Also, the error that is being throw is one of an IO error, indicating that the data in my SDE does not exist. The problem is, the data does exist so I feel like it's a connection error and I am not sure how to solve it.