diff --git a/src/dxtbx/model/experiment_list.py b/src/dxtbx/model/experiment_list.py index 2de61f066..dc7d1172c 100644 --- a/src/dxtbx/model/experiment_list.py +++ b/src/dxtbx/model/experiment_list.py @@ -14,7 +14,7 @@ from typing import Any, Callable, Generator, Iterable import natsort -import tqdm +from tqdm import tqdm import dxtbx from dxtbx.format.Format import Format @@ -674,11 +674,11 @@ def from_filenames( format_kwargs = {} if os.isatty and len(filenames) > 1: - iter = tqdm.tqdm(to_process, total=len(filenames)) + filename_iter = tqdm(to_process, total=len(filenames)) else: - iter = to_process + filename_iter = to_process - for filename in iter: + for filename in filename_iter: # We now have a file, pre-opened by Format.open_file (therefore # cached). Determine its type, and prepare to put into a group format_class = find_format.find_format(filename)