From 326655d29feb060d25417da7dd1cf00b505f8325 Mon Sep 17 00:00:00 2001 From: t-reents Date: Mon, 19 Feb 2024 10:07:00 +0100 Subject: [PATCH] Fix `dry_run` in `BaseSubmissionController`. The `submit_new_batch` method fails when setting `dry_run = True`, as it attempts to index a `set` which raises a `TypeError`. This issue is fixed by converting the `set` to a `list`. --- aiida_submission_controller/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiida_submission_controller/base.py b/aiida_submission_controller/base.py index 11dc4db..12ac2e0 100644 --- a/aiida_submission_controller/base.py +++ b/aiida_submission_controller/base.py @@ -182,7 +182,7 @@ def submit_new_batch(self, dry_run=False, sort=False, verbose=False): """Submit a new batch of calculations, ensuring less than self.max_concurrent active at the same time.""" CMDLINE_LOGGER.level = logging.INFO if verbose else logging.WARNING - extras_to_run = set(self.get_all_extras_to_submit()).difference(self._check_submitted_extras()) + extras_to_run = list(set(self.get_all_extras_to_submit()).difference(self._check_submitted_extras())) if sort: extras_to_run = sorted(extras_to_run)