You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to commit changes to the repository, the commit fails due to a UnicodeEncodeError. The error occurs specifically when the conventional-precommit-linter hook is executed. The hook attempts to print a Unicode character (\u274c), causing the encoding error.
Traceback
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
black....................................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
black................................................(no files to check)Skipped
Conventional Commit......................................................Failed
- hook id: conventional-precommit-linter
- exit code: 1
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Scripts\conventional-precommit-linter.EXE\__main__.py", line 7, in<module>
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Lib\site-packages\conventional_precommit_linter\hook.py", line 194, in main
print(f'\u274c Missing colon after {_color_purple("<type>")} or {_color_blue("(<optional-scope>)")}.')
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Lib\site-packages\colorama\ansitowin32.py", line 47, in write
self.__convertor.write(text)
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Lib\site-packages\colorama\ansitowin32.py", line 177, in write
self.write_and_convert(text)
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Lib\site-packages\colorama\ansitowin32.py", line 202, in write_and_convert
self.write_plain_text(text, cursor, start)
File "C:\Users\Yosst\.cache\pre-commit\repor_xbn2az\py_env-python3.12\Lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
self.wrapped.write(text[start:end])
File "C:\Users\Yosst\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 character '\u274c' in position 0: character maps to <undefined>
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Error while committing due to a UnicodeEncodeError
Error while committing due to a UnicodeEncodeError (RDT-756)
Apr 2, 2024
I've ran a few tests and it appears the issue may be related to Unicode resolution (Windows).
Could you please test this version on your system, where complex Unicode characters have been replaced with simple text, and let me know if it resolves your problem?
Description
When attempting to commit changes to the repository, the commit fails due to a UnicodeEncodeError. The error occurs specifically when the conventional-precommit-linter hook is executed. The hook attempts to print a Unicode character (\u274c), causing the encoding error.
Traceback
Precommit-config
The text was updated successfully, but these errors were encountered: