diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index ac6dd6b5..de4a3000 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -496,7 +496,8 @@ set ``stream`` to ``True`` and iterate over the response with # filter out keep-alive new lines if line: - print(json.loads(line)) + decoded_line = line.decode('utf-8') + print(json.loads(decoded_line)) .. warning::