diff --git a/tqdm/_utils.py b/tqdm/_utils.py index 19bc857b..dac5c15d 100644 --- a/tqdm/_utils.py +++ b/tqdm/_utils.py @@ -137,4 +137,4 @@ def _term_move_up(): # pragma: no cover def _sh(*cmd, **kwargs): return subprocess.Popen(cmd, stdout=subprocess.PIPE, - **kwargs).communicate()[0] + **kwargs).communicate()[0].decode('utf-8') diff --git a/tqdm/tests/tests_main.py b/tqdm/tests/tests_main.py index 97744e29..e6bcd261 100644 --- a/tqdm/tests/tests_main.py +++ b/tqdm/tests/tests_main.py @@ -9,7 +9,7 @@ from tests_tqdm import with_setup, pretest, posttest, _range def _sh(*cmd, **kwargs): return subprocess.Popen(cmd, stdout=subprocess.PIPE, - **kwargs).communicate()[0] + **kwargs).communicate()[0].decode('utf-8') # WARNING: this should be the last test as it messes with sys.stdin, argv