I frequently encounter this error after I mess up in a script: "Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000582: Error occurred during execution."
When I then fix the script, the error persists until I restart ArcGIS. This is a pain.
For example, say I try to export and overwrite a pdf, but the pdf is still open in Adobe Acrobat. This causes an error. So I go and close Acrobat, but the script still won't run. It will only work after I restart ArcGIS, even though nothing else changes.
Why is this? How can I 'flush' arcpy so I can successfully run scripts without having to restart the app?
Thanks for your tips