AnsweredAssumed Answered

Using arcpy's datasettype method on SDE Feature Class

Question asked by BrokenLegMike on Jun 5, 2015
Latest reply on Jun 8, 2015 by BrokenLegMike

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?

Outcomes