diff --git a/tqdm/utils.py b/tqdm/utils.py index aae87e45..64665990 100644 --- a/tqdm/utils.py +++ b/tqdm/utils.py @@ -285,7 +285,7 @@ def _screen_shape_linux(fp): # pragma: no cover except Exception: try: return [int(os.environ[i]) - 1 for i in ("COLUMNS", "LINES")] - except KeyError: + except (KeyError, ValueError): return None, None