I have a very simple script that isn't working.
import arcpyworkspace = "C:\\Users\\Work\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\master.sde"arcpy.env.workspace = workspacewire = "gis.DBO.wire"with arcpy.da.SearchCursor(wire, "id") as cursor: for row in cursor: print row[0]It returns RuntimeError: cannot open 'gis.DBO.wire'
However, if I run the following code after the above:
"gis.DBO.wire" in arcpy.ListFeatureClasses()it returns True
I know that this should be working. Any idea what could be wrong?
أكثر...
import arcpyworkspace = "C:\\Users\\Work\\AppData\\Roaming\\ESRI\\Desktop10.3\\ArcCatalog\\master.sde"arcpy.env.workspace = workspacewire = "gis.DBO.wire"with arcpy.da.SearchCursor(wire, "id") as cursor: for row in cursor: print row[0]It returns RuntimeError: cannot open 'gis.DBO.wire'
However, if I run the following code after the above:
"gis.DBO.wire" in arcpy.ListFeatureClasses()it returns True
I know that this should be working. Any idea what could be wrong?
أكثر...