I am creating a new layer out of an old one with MakeFeatureLayer_management
like this:
arcpy.MakeFeatureLayer_management("layername", "newlayername", "DEPTH = 1200")
This works for the first time but if I want to execute the function on the same layer again (with a new out_layer
and a different where clause
) like this:
arcpy.MakeFeatureLayer_management("layername", "secondlayername", "DEPTH = 1400")
I get
Runtime error Traceback (most recent call last):
File "", line 1, in
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5774, in MakeFeatureLayer
raise e ExecuteError: ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid. ERROR 000628: Cannot set input into parameter in_features.
Also the auto completion for in_features
no longer shows the used layer.
What can I do to fix this?