awslogs icon indicating copy to clipboard operation
awslogs copied to clipboard

Bug in awslog

Open jaapelzinga opened this issue 4 years ago • 0 comments
trafficstars

You've found a bug! Please, raise an issue attaching the following traceback https://github.com/jorgebastida/awslogs/issues/new

Python: 2.7.16 (default, Jun  5 2020, 22:59:21)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-
boto3 version: 1.9.161
Platform: Darwin-19.6.0-x86_64-i386-64bit
Config: {'output_timestamp_enabled': False, 'watch_interval': 1, 'end': None, 'log_group_name': '/aws/lambda/lambda-sftp-upload', 'log_stream_name': 'ALL', 'output_group_enabled': True, 'color': 'auto', 'aws_region': None, 'watch': False, 'aws_access_key_id': 'SENSITIVE', 'start': '50m', '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', 'output_stream_enabled': True}
Args: ['/Users/jaapelzinga/Library/Python/2.7/bin/awslogs', 'get', '/aws/lambda/lambda-sftp-upload', '--ALL', '--start=50m']

Traceback (most recent call last):
  File "/Users/jaapelzinga/Library/Python/2.7/lib/python/site-packages/awslogs/bin.py", line 178, in main
    getattr(logs, options.func)()
  File "/Users/jaapelzinga/Library/Python/2.7/lib/python/site-packages/awslogs/core.py", line 223, in list_logs
    consumer()
  File "/Users/jaapelzinga/Library/Python/2.7/lib/python/site-packages/awslogs/core.py", line 212, in consumer
    print(' '.join(output))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 369, in write
    data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 191-192: ordinal not in range(128)

jaapelzinga avatar Mar 01 '21 09:03 jaapelzinga