Hi everyone,
I am experiencing an issue with the ListFeatureClasses function in ArcPy. Below you can see that my Fire.gdb geodatabase contains some feature classes which exist in the directory but are not reported by the function. Do you have any suggestions why this could be the case? I would also appreciate if you have any suggestions about how to make them visible again.
Below, I also inserted a code on how these feature classes were generated: They were essentially copied from another feature class.
Thank you,
David
arcpy.env_workspace = Geodatabase
print(Geodatabase)
C:\Users\Administrator\Documents\Fire.gdb
feature_list = arcpy.ListFeatureClasses()
day_name = "PolyFire_2010305_d07"
if day_name in feature_list:
... print(True)
else:
... print(False)
False
alt_path=Geodatabase + "\\" + day_name
desc=arcpy.Describe(alt_path)
desc.dataType
'FeatureClass'
desc.CatalogPath
'C:\\Users\\Administrator\\Documents\\Fire.gdb\\PolyFire_2010305_d07'
Geodatabase_rep = "C:\Users\Administrator\Documents\\Fire rep.gdb"
arcpy.env.workspace = Geodatabase_rep
feature_classes = arcpy.ListFeatureClasses()
for fc in feature_classes:
out_fc = os.path.join(Geodatabase, fc)
arcpy.CopyFeatures_management(fc, out_fc)
print(fc)