Control: reassign -1 python3-nxtomomill,python3-tqdm Control: tags -1 patch Control: severity -1 important (Lowering severity as nxtomomill's tests have been disabled.)
The difference might be what version of Python you're using: a comment in the tqdm upstream bug notes that this happens in Python 3.13 but not Python 3.12. This might also be why nxtomomill upstream don't seem to have noticed, as they run their CI in up to Python 3.12.
They also note that it happens during interpreter shutdown, when datetime is garbage-collected before tqdm runs close(). I'm not sure if that's supposed to be possible ( https://peps.python.org/pep-0442/ ).
This suggests that one possible solution would be for close() to check for this condition and then not try to display the bar (similar to how it already doesn't if the output stream has been closed: https://sources.debian.org/src/tqdm/4.67.1-5/tqdm/std.py#L1289 ). However, the obvious ways to do so risk either false positives ( https://docs.python.org/3/library/sys.html#sys.is_finalizing will also be True when the application is exiting but display() would still work) or false negatives (if datetime is None: will only check datetime, which might not be the only missing module that can trigger this kind of crash), so I'm not sure if it's worth it.
Given that we do have an easy way to fix this particular instance in nxtomomill, I suggest doing that:
https://salsa.debian.org/python-team/packages/python-nxtomomill/-/merge_requests/1

