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 I run the command git-ai-commit config --setup after package installation, I immediately encounter this error:
Welcome to AI Commit MSG! Let's get you set up.
[Setup] Git prepare-commit-msg hook
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\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\git-ai-commit.exe\__main__.py", line 7, in <module>
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\main.py", line 154, in main
config_handler(args)
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\cli\config_handler.py", line 50, in config_handler
handle_config_setup()
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\cli\config_handler.py", line 9, in handle_config_setup
onboarding_flow()
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\services\onboarding_service.py", line 81, in onboarding_flow
setup_git_hook()
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\cli\hook_handler.py", line 99, in setup_git_hook
handle_setup_hook(file_path)
File "C:\Users\USER_NAME\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\ai_commit_msg\cli\hook_handler.py", line 56, in handle_setup_hook
file.write(get_bash_script())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2288.0_x64__qbz5n2kfra8p0\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 273-274: character maps to <undefined>
Only after I modified the handle_setup_hook() function in hook_handler.py to handle utf-8 encodes did it get to work.
The text was updated successfully, but these errors were encountered:
when I run the command
git-ai-commit config --setup
after package installation, I immediately encounter this error:Only after I modified the
handle_setup_hook()
function in hook_handler.py to handle utf-8 encodes did it get to work.The text was updated successfully, but these errors were encountered: