diff --git a/rmgpy/rmg/main.py b/rmgpy/rmg/main.py index 01763b7605..9d1b266ddf 100644 --- a/rmgpy/rmg/main.py +++ b/rmgpy/rmg/main.py @@ -1342,6 +1342,10 @@ def make_seed_mech(self): temp_seed_dir = os.path.join(self.output_directory, 'seed_tmp') # Move the seed from the previous iteration to a temporary directory in case we run into errors + + # First, remove the temporary seed mechanism if it exists from a previous run + if os.path.exists(temp_seed_dir): + shutil.rmtree(temp_seed_dir) try: os.rename(seed_dir, temp_seed_dir) except PermissionError: # The Windows Subsystem for Linux (WSL) can have problems with renaming