I am trying to get list of datasets within sde connection.This sde connection is already present in ArcMap and all datasets are visible. I am posting snapshot my code. It is returning empty array,though there are clearly many datasets available. What is the problem with my code?
import arcpy arcpy.env.workspace = "C:\Users\Vijay\AppData\Roaming\ESRI\Desktop10.5\ArcCatalog\xxx.sde" featureDatasets = arcpy.ListDatasets() print featureDatasets for fc in featureDatasets: try: print fc except Exception as e: print e