Having trouble listing feature classes using arcpy

279
2
Jump to solution
01-28-2023 03:23 PM
NathanBaier1
New Contributor III

Hi all, 

I am using arcpy to list feature classes to push them into a merge function. I keep being a return value of none. To trouble shoot I split the arcpy.ListFeatureClasses function into a new script and tested it standalone. When I did it came up with none on multiple geodatabases that all contained data. I have double checked the environments to make sure I am using the same FGDB as is in the script. 

Has anyone had issues with arcpy.ListFeatureClasses recently? Any suggestions?

Below is my test code:

import arcpy
import os
from arcpy import env
arcpy.env.workspace = r"\C:\GIS\Projects\TetonRange\SplitQuarters.gdb"
env.overwriteOutput = True

fsc = arcpy.ListFeatureClasses("c*")
print(fsc)

results are none.

thanks!

 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor
r"\C:\GIS\Projects\TetonRange\SplitQuarters.gdb"

should probably be

 

r"C:\GIS\Projects\TetonRange\SplitQuarters.gdb"

 


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor
r"\C:\GIS\Projects\TetonRange\SplitQuarters.gdb"

should probably be

 

r"C:\GIS\Projects\TetonRange\SplitQuarters.gdb"

 


... sort of retired...
0 Kudos
NathanBaier1
New Contributor III

Bingo. Thank you Dan!

0 Kudos