checkov
checkov copied to clipboard
Why is a Hebrew Point Rafe character (\u05bf) included in console output when parsing errors are encountered?
Describe the issue The console output when encountering errors parsing files includes a Hebrew Point Rafe character (\u05bf) at the end of file names.
Additional context I am trying to run checkov as a subprocess of another application and I keep getting encoding problems that lead to an unhandled exception whenever the console attempts to write these errors. When I run checkov normally (not in my subprocess) it works and prints the lines provided in my image above. I have been trying to override the encoding to utf-8, but I thought it worth asking if this output is even intended. This is the exact error message I receive:
[Error] 2024-06-07 16:54:17,443 [MainThread ] [ERROR] Exception traceback:
[Error] Traceback (most recent call last):
[Error] File "checkov\main.py", line 557, in run
[Error] exit_codes.append(self.print_results(
[Error] File "checkov\main.py", line 823, in print_results
[Error] return runner_registry.print_reports(
[Error] File "checkov\common\runners\runner_registry.py", line 501, in print_reports
[Error] print(report.print_console(
[Error] File "colorama\ansitowin32.py", line 47, in write
[Error] File "colorama\ansitowin32.py", line 177, in write
[Error] File "colorama\ansitowin32.py", line 205, in write_and_convert
[Error] File "colorama\ansitowin32.py", line 210, in write_plain_text
[Error] File "colorama\ansitowin32.py", line 47, in write
[Error] File "colorama\ansitowin32.py", line 177, in write
[Error] File "colorama\ansitowin32.py", line 205, in write_and_convert
[Error] File "colorama\ansitowin32.py", line 210, in write_plain_text
[Error] File "encodings\cp1252.py", line 19, in encode
[Error] UnicodeEncodeError: 'charmap' codec can't encode character '\u05bf' in position 162: character maps to