Hey Everyone,
I wrote a python script for a client that extracts a project template to a new folder, manipulates the data and layouts in that new project, creates PDFs, saves a copy of that extracted project file with the current month/year, and then tries to delete the extracted project. The deletion always fails, and my VS Code terminal or the GP tool I built the script for says it's because the project is open somewhere.
I have tried deleting every variable that references the project, maps, layouts, elements, all arcpy.mp classes for that matter, and it still always fails.
Even if I close Pro where I ran the GP tool, or close VS Code where I was debugging the script and then go to File Explorer to delete the extracted Pro project, File Explorer says I can't because the file is open somewhere, which it is not when looking at my computer.
Has anyone encountered this, and/or know a way around it?
Thanks!
- Jack C