Monkey patch tqdm to fix closing progressbar
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -109,7 +109,15 @@ def progressbar(self):
warnings.filterwarnings("ignore", category=TqdmExperimentalWarning)
- return partial(tqdm, options={'console': console})
+ # Monkeypatch https://github.com/tqdm/tqdm/pull/1395
+ class Tqdm(tqdm):
+ def close(self):
+ if self.disable:
+ return
+ self.display()
+ super().close()
+
+ return partial(Tqdm, options={'console': console})
@cached_property
def run_config(self):

Monkey patch tqdm to fix closing progressbar