-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Not sure if you officially support Windows, so feel free to close this if you don't. On Windows, if acdoctor finds a problem with the ligand, it is very difficult to read because the error message is swamped in hundreds of other error messages along these lines:
During handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File "C:\Users\exper\AppData\Local\Programs\Cresset-BMD\Flare\python39.zip\shutil.py", line 629, in _rmtree_unsafe\r\nPermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\exper\\AppData\\Local\\Temp\\tmpdbm8egcl'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File "C:\Users\exper\AppData\Local\Programs\Cresset-BMD\Flare\python39.zip\tempfile.py", line 805, in onerror\r\nPermissionError: [WinError 5] Access is denied: 'C:\\Users\\exper\\AppData\\Local\\Temp\\tmpdbm8egcl'\r\n\r\n
This happens because the process changes to a temporary directory that it then tries to delete (after the exception is raised) without changing out of it again. This does not occur on Linux or Mac. To fix this, before both instances of raise Exception(msg) in template_generators.py, there should be a line os.chdir(cwd) to ensure that the temporary directories can be deleted.