Once the script completes(with the error) I can use ArcCatalog to delete the gdb with no problem.
I'm trying to delete a file geodatabase in my script and I keep getting the dreaded may be locked by another application error. It's not in use by any other application. The script creates the gdb. I've reset my environments, refreshed the catalog, and even tried deleting the gp first and then using os.remove to delete the gdb but no luck. I have made sure to delete all my search and update cursors along the way so that shouldn't lock it. Once the script completes(with the error) I can use ArcCatalog to delete the gdb with no problem. If anyone has a suggestion I'm all ears. At this point I've spent almost as much time developing the entire complex script as I have trying to delete the geodatabase.