Command "Delete" is not currently available
Hi,
I'm trying to figure out why i suddenly get this error when i run my script.
I verify, in VSCode that
activeDocument.layers.getByName("split_2")
[ArtLayer split_2]
But when i try to remove it:
activeDocument.layers.getByName("split_2").remove()
I get this:

I restarted PS, run the same script and the error is gone.
Is there anything i can do to try and understand what caused it to prevent this from happening again?
Thanks,
