From 66cf3cd3463d3bac2a65094b08b3ba6a905fbf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20PV=20Correia?= Date: Wed, 19 Jan 2022 18:15:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix tqdm progress bars --- GithubAPIBot.py | 3 +++ bot_follow.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/GithubAPIBot.py b/GithubAPIBot.py index 24c121f..f447ebb 100644 --- a/GithubAPIBot.py +++ b/GithubAPIBot.py @@ -217,6 +217,7 @@ def run(self, action): dynamic_ncols=True, smoothing=True, bar_format="[PROGRESS] {n_fmt}/{total_fmt} |{l_bar}{bar}|", + position=0, leave=False, ) for user in users: @@ -244,6 +245,8 @@ def run(self, action): dynamic_ncols=True, smoothing=True, bar_format="[SLEEPING] {n_fmt}s/{total_fmt}s |{l_bar}{bar}|", + position=1, + leave=False, ) for second in sleepSecondsBar: time.sleep(1) diff --git a/bot_follow.py b/bot_follow.py index 594148b..5de4711 100644 --- a/bot_follow.py +++ b/bot_follow.py @@ -53,7 +53,7 @@ raise SystemExit(e) if res.status_code == 404: - raise ValueError("\nGiven country is not valid. Check README for the valid countries.\n") + raise ValueError(f"\n\"{args.popular}\" is not a valid country. Check README for the valid countries.\n") popularUsers = res.json()