Select to view content in your preferred language

RuntimeError: DescribeData: Method connectionProperties does not exist

3354
1
12-23-2013 01:03 AM
RavindraSingh
Frequent Contributor
I want to get the connection Details from sdeConnection file.
<someName>.sde file
e.g. serverName, service, user, password etc.

for this I am writing following script.

import arcpy

desc = arcpy.Describe("C:\TEMP\sdeCon\connection.sde")
conPop = desc.connectionProperties()

@ above line it get error-- "RuntimeError: DescribeData: Method connectionProperties does not exist"

can some one please help, why so is happening, and how can I get the connection details from SdeFile.


NOTE:: Even I am getting the same issue in both ArcGIS 10 and 10.1
and I have set the path as C:\Python26\ArcGIS10.0 for ArcGIS 10 and C:\Python26\ArcGIS10.1 for ArcGIS 10.1
Tags (2)
0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor
Hi Ravindra,

You will want to place an 'r' in front of the path to your sde connection file.  Ex:

desc = arcpy.Describe(r"C:\TEMP\sdeCon\connection.sde")
conPop = desc.connectionProperties()


Take a look at the following link for more information on setting paths:

http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000000r000000
0 Kudos