You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tqdm>= 4.70 changes how iterators are handled #5540
An iteration through the trajectory that ran into an exception (also includes stopping execution in a notebook) keeps the Universe unchanged.
Actual behavior
tdqm closes the TrajectoryReader.
We ran into this because our test suite runs the MDAnalysis API tests against our AnalysisBase and ran test_incomplete_defined_analysis before test_old_api, and that one kept failing.
I traced the problem back to this small change in tqdm (tqdm/tqdm@5dcb022). This removed the protection around the iterator.
In principle this is expected behaviour, tqdm does that self.close() statements to clean up iterators on errors.
The normal AnalysisBase seems to be safe because it always runs the trajectory through the sliced iterator.
Hi @Smruti0603, welcome to MDAnalysis! In general, we do not assign issues. If an issue has no open PR, then feel free to work on it and open a PR when ready.
Hi! This PR fixes #5540 . I've merged the latest develop, all 25 checks are passing, and patch coverage is 100%. Could someone with write access take a look when you have time? Happy to make any changes you'd like. Thanks
Activity
Smruti0603 commentedon Nov 6, 2026
Hey @hejamu, I am new here, Would like to pick this issue.. Can you assign it to me ?
RMeli commentedon Nov 6, 2026
Hi @Smruti0603, welcome to MDAnalysis! In general, we do not assign issues. If an issue has no open PR, then feel free to work on it and open a PR when ready.
docs: add changelog and author entries for MDAnalysis#5540
orbeckst commentedon Nov 13, 2026
@hejamu thanks for the detailed report. Would you be interested in reviewing the PR #5546 and check if it fixes the issues?
Srikar025 commentedon Nov 15, 2026
Hi! This PR fixes #5540 . I've merged the latest develop, all 25 checks are passing, and patch coverage is 100%. Could someone with write access take a look when you have time? Happy to make any changes you'd like. Thanks