From 297becf6668e1930ed9311c42c107e9b7830cd5d Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Wed, 12 Feb 2025 16:51:48 +0000 Subject: [PATCH] Iterate over progress bar iterable wrapping block splitter As the [`tqdm` docs](https://tqdm.github.io/docs/tqdm/#tqdm-objects) points out, the wrapper iterable behaves exactly as the wrapped iterable but with extra progress bar functionality. Therefore, the splitter iterable shouldn't be used directly to gte blocks, but rather the progress bar iterable that wraps the splitter iterable. See issue #543 for more details. --- httomo/runner/task_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httomo/runner/task_runner.py b/httomo/runner/task_runner.py index 06fe1ee19..d125d475d 100644 --- a/httomo/runner/task_runner.py +++ b/httomo/runner/task_runner.py @@ -121,7 +121,7 @@ def _execute_section(self, section: Section, section_index: int = 0): unit="block", ascii=True, ) - for idx, (block, _) in enumerate(zip(splitter, progress)): + for idx, block in enumerate(progress): end_source = time.perf_counter_ns() if self.monitor is not None: self.monitor.report_source_block(