I am trying to list all feature classes from multiple datasets with single GDB. I have tried with below code
import arcpy
from arcpy import env
env.workspace = r"C:\GDB\Base.gdb"
fdlist = arcpy.ListDatasets("*","feature")
for fd in fdlist:
print fd
env.workspace = fd
fclist = arcpy.ListFeatureClasses()
for fc in fclist:
print(fc)
Lists a few feature classes in first dataset then display below error.I have found some scripts that works for single dataset.
Traceback (most recent call last): File "C:\SOFTWARE\Arcpy\Arcpy_Script\List_fc.py", line 47, in for fc in fclist: TypeError: 'NoneType' object is not iterable
for fc in fclist if fclist else []: