Im trying to create a tool that buffers a feature class (polygon) and then intersects the buffer output layer with a point shapefile. When I run the tool the buffer analysis runs and completes but the intersect analysis does not. The error message is
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: (my buffer output layer & point shapefile) does not exist or is not supported
Failed to execute (Intersect).
All my layers are loaded in my arcmpap so I am not sure why it does that.
import arcpy
in_Path = arcpy.GetParameterAsText(0) # first parameter in the interactive tool
out_Path = arcpy.GetParameterAsText(1) # second parameter in the interactive tool
bufferDistance = arcpy.GetParameterAsText(2)# third parameter in the interactive tool
result_buffer = arcpy.Buffer_analysis(in_Path, out_Path, bufferDistance,"FULL", "ROUND", "ALL", "") #the parameters to able compute the tool
# ^^ assign variable for the buffer analysis tool
in_CitiesShapefile = arcpy.GetParameterAsText(3)# fourth parameter in the interactive tool
out_CitiesWithinBuffer = arcpy.GetParameterAsText(4) # fifth parameter in the interactive tool
arcpy.Intersect_analysis([out_Path, in_CitiesShapefile], out_CitiesWithinBuffer,"ALL", "", "INPUT") #the parameters to able compute the tool