I'm trying to create a script that pulls about 20 or so feature classes out of sde and puts them in a geodatabase for a group of people to look at for a special project. I'm trying to do this with a for loop and the copy_management function. However after playing around with the script for a while I realized I needed to start back at the beginning because I seem to be having an issue getting the ListFeatureClasses function to even return anything from my SDE connection. Here is just a simple test I put together:
warehouse = r"C:\Users\aaronmanuel\AppData\Roaming\ESRI\Desktop10.0\ArcCatalog\Warehouse.sde"
testgdb = r"C:\Projects\Test\TestGDB.gdb"
arcpy.env.workspace = warehouse
fcList = arcpy.ListFeatureClasses("*")
Running this script returns "[ ]" - an empty list.
Running it after changing the environment to the testgdb returns this:
[u'TestLine', u'coa_water_meter', u'coa_water_hydrant']
Which is correct, I put in these three features for testing purposes.
Googling has led me a few other threads of the "ListFeatureClasses returns an empty list" variety, but ultimately I couldn't find any real answer. What other factors besides stuff like typos and incorrect file paths could be causing this function to return and empty list?