I am new to python, am debugging one of existing python code, where am facing an error "'module' object has no attribute 'SdeWorkspaceFactory". Earlier this code was working fine but suddenly does not work.
am using sde connection file from path "C:\Users\user1\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\Connection.sde
I could able to connect this using sde file using Arcatalog.
Environment : ArcGIS 10.1
I cannot provide entire code base, however most of code looks like correct.
Please provide me a pointer?
def OpenFeatureClass(sWorkspace, sFCName): import comtypes.gen.esriGeoDatabase as esriGeoDatabase import comtypes.gen.esriDataSourcesGDB as esriDataSourcesGDB #pWSF = NewObj(esriDataSourcesGDB.FileGDBWorkspaceFactory, esriGeoDatabase.IWorkspaceFactory) pWSF = NewObj(esriDataSourcesGDB.SdeWorkspaceFactory, esriGeoDatabase.IWorkspaceFactory) pWS = pWSF.OpenFromFile(sWorkspace, 0) pFWS = CType(pWS, esriGeoDatabase.IFeatureWorkspace) pFC = pFWS.OpenFeatureClass(sFCName) return pFC