You have a few issues, not sure if they are related to the problem you are having or some mistake in copying your code. Your where_clause has a syntax error and your in_features variable should be raw stringed or you should be setting your workspace to the FGDB.Something like thisimport arcpy
# Set local variables
arcpy.env.workspace = ws = r"..\working.gdb"
in_features = "linefile"
out_feature_class = "C:/output/linefile_zeros.shp"
query_field = "Shape_Length"
field_delim = arcpy.AddFieldDelimiters(ws,query_field)
where_clause = "{0} = 0".format(field_delim)
# Execute Select
arcpy.Select_analysis(in_features, out_feature_class, where_clause)