From b1567b35c4f77dbe192369e31b49899d3a0b05a1 Mon Sep 17 00:00:00 2001 From: Iuri Jacob Date: Tue, 19 Nov 2024 21:56:06 -0300 Subject: [PATCH] Fix UnicodeEncodeError when running in windows and pipe to a file --- awslogs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awslogs/core.py b/awslogs/core.py index 748896e..2450cb9 100644 --- a/awslogs/core.py +++ b/awslogs/core.py @@ -203,7 +203,7 @@ def consumer(): if not isinstance(message, str): message = json.dumps(message) output.append(message.rstrip()) - print(" ".join(output)) + print(" ".join(output).encode("utf-8")) try: sys.stdout.flush()