jorgebastida / jorgebastida/awslogs
awslogs get crashes
- Dominant language
- Python
- Stars
- 5k
- Forks
- 342
- PR merge metrics
- No merged PRs in 30d
Description
I've invoked
`awslogs get prod-XXX-backend --start='25/09/2017 07:00' --end='25/09/2017 08:00'`
Error report
```
Version: 0.10.0
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
boto3 version: 1.4.7
Platform: Linux-4.4.0-83-generic-x86_64-with-Ubuntu-16.04-xenial
Config: {'output_timestamp_enabled': False, 'output_group_enabled': True, 'end': '25/09/2017 08:00', 'log_group_name': 'prod-XXX-backend', 'log_stream_name': 'ALL', 'aws_region': None, 'watch': False, 'aws_access_key_id': 'SENSITIVE', 'start': '25/09/2017 07:00', 'aws_profile': 'SENSITIVE', 'filter_pattern': None, 'aws_secret_access_key': 'SENSITIVE', 'output_ingestion_time_enabled': False, 'query': None, 'func': 'list_logs', 'aws_session_token': 'SENSITIVE', 'color_enabled': True, 'output_stream_enabled': True}
Args: ['/home/markus/.local/bin/awslogs', 'get', 'prod-XXX-backend', '--start=25/09/2017 07:00', '--end=25/09/2017 08:00']
Traceback (most recent call last):
File "/home/markus/.local/lib/python2.7/site-packages/awslogs/bin.py", line 172, in main
getattr(logs, options.func)()
File "/home/markus/.local/lib/python2.7/site-packages/awslogs/core.py", line 196, in list_logs
consumer()
File "/home/markus/.local/lib/python2.7/site-packages/awslogs/core.py", line 185, in consumer
print(' '.join(output))
File "/usr/lib/python2.7/codecs.py", line 369, in write
data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 398: ordinal not in range(128)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in awslogs/core.py at list_logs and its consumer, especially the print(' '.join(output)) call shown in the traceback. Reproduce the provided awslogs get command with log output containing the reported non-ASCII character, then verify the command completes without a UnicodeEncodeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100