Skip to content

Commit 846f9a1

Browse files
committed
TQDM Mod fix
1 parent 025fb31 commit 846f9a1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • activity_browser/mod/tqdm

activity_browser/mod/tqdm/std.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
@patch_attribute(tqdm, "update")
77
def update(self, n=1):
88
patched[tqdm]["update"](self, n)
9-
qt_tqdm.updated.emit(int(self.n/self.total * 100), self.desc)
9+
try:
10+
qt_tqdm.updated.emit(int(self.n/self.total * 100), self.desc)
11+
except (TypeError, ZeroDivisionError):
12+
# Handle case where total is None or zero
13+
pass
1014

1115

1216
@patch_attribute(tqdm, "close")

0 commit comments

Comments
 (0)