AnsweredAssumed Answered

Arcpy “Select” Returns Error 000732

Question asked by bisoftware on Dec 4, 2017
Latest reply on Dec 5, 2017 by bisoftware

I'm trying to use this "Select" script from https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fpro.arcgis.com%2Fen%2Fpro-app%2Ftool-reference%2Fanalysis… 

but it keeps giving me the following error.

 

Traceback (most recent call last):

  File "<string>", line 10, in <module>

  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 91, in Select

    raise e

  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 88, in Select

    retval = convertArcObjectToPythonObject(gp.Select_analysis(*gp_fixargs((in_features, out_feature_class, where_clause), True)))

  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda>

    return lambda *args: val(*gp_fixargs(args, True))

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.ERROR 000732: Input Features: Dataset C:\arcGIS_Shared\Python\PythonTestScript.gdb\CAPatients does not exist or is not supportedFailed to execute (Select).

 

And Here is the script I'm using:

 

# Import system modules
import arcpy
# Set local variables
in_features = r"C:\arcGIS_Shared\Python\PythonTestScript.gdb\CAPatients"
out_feature_class = r"C:\arcGIS_Shared\Python\PythonTestScript.gdb\Geocoded2"
where_clause = '"Age" = \'62\''
# Execute Select
arcpy.Select_analysis(in_features, out_feature_class, where_clause)

 

In the script above, the datatype for "Age" is "long"; but I have also tried replacing "Age" with "Zip_Code", which is "text".

 

Anyone have any ideas what I'm doing wrong or missing?

Outcomes