From 6e4b48cfcb5663ef6a8a92d51b9c04ae41ff7d20 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 28 Jun 2020 21:12:31 +0100 Subject: [PATCH] gui: fix TypeError on unknown `len()` - fixes #971 --- tqdm/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tqdm/gui.py b/tqdm/gui.py index 35f5c5e5..73103d75 100644 --- a/tqdm/gui.py +++ b/tqdm/gui.py @@ -53,7 +53,7 @@ class tqdm_gui(std_tqdm): # pragma: no cover self.mininterval = max(self.mininterval, 0.5) self.fig, ax = plt.subplots(figsize=(9, 2.2)) # self.fig.subplots_adjust(bottom=0.2) - total = len(self) + total = self.__len__() # avoids TypeError on None #971 if total is not None: self.xdata = [] self.ydata = []