diff --git a/helper.py b/helper.py index f9314f9..7e4ce12 100644 --- a/helper.py +++ b/helper.py @@ -123,7 +123,8 @@ def load_targets(targetdb): attempts = 0 while attempts < max_attempts: try: - with open(targetdb, "rb") as tmp: + # we avoid "rb" as the JSON object must be str, not bytes + with open(targetdb, "r") as tmp: targets = json.loads(tmp.read()) except ValueError: print("[helper] Failed to read valid JSON, trying again in 1 sec")