jorgebastida / jorgebastida/awslogs

You've found a bug

Open
#400 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5k
Forks
342
PR merge metrics
No merged PRs in 30d

Description

Version: 0.15.0
Python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)]
boto3 version: 1.34.86
Platform: Windows-11-10.0.22631-SP0

Traceback (most recent call last):
File "C:\Users\user1\AppData\Local\Programs\Python\Python312\Lib\site-packages\awslogs\bin.py", line 210, in main
getattr(logs, options.func)()
File "C:\Users\user1\AppData\Local\Programs\Python\Python312\Lib\site-packages\awslogs\core.py", line 219, in list_logs
consumer()
File "C:\Users\user1AppData\Local\Programs\Python\Python312\Lib\site-packages\awslogs\core.py", line 206, in consumer
print(" ".join(output))
File "C:\Users\user1\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1900-1905: character maps to

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in awslogs/core.py at list_logs and the consumer around line 206, where output is passed to print. Reproduce the failure on Windows with Python 3.12 and CloudWatch log content containing characters outside cp1252; done means the command no longer raises UnicodeEncodeError while displaying that output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.