I have temporary layer that I'm creating in a Pro Notebook.
arcpy.MakeFeatureLayer_management(boec, r"memory\boecFL")
Once I'm done processing, I'm attempting to delete it, but I get an error message. If I manually delete it, it works, but then when I copy that from the History as a Python snippet and try and run it, it fails.
arcpy.management.Delete(
in_data=r"memory\boecFL",
data_type="GPFeatureLayer"
)
WARNING 000110: memory\boecFL does not exist
I've tried various permutations for in_data and data_type. Running Pro 3.1.7. What am I missing?
Solved! Go to Solution.
Because that's what Copy Snippet gave me. I took it out and it works. Seems like a common thing that Copy Snippet doesn't match what you should actually do in your code. Anyway, thank you everyone for the help.
Huh, interesting. It may be a defect in the Copy Snippet functionality. I am glad it is working for you now.
I'm still here! Will give it a try.