Open kirxkirx opened 1 year ago
Message that will be displayed on users' first issue
$ copilot find a txt file
Traceback (most recent call last):
File "/opt/homebrew/bin/copilot", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.10/site-packages/copilot/copilot.py", line 83, in main
{history.get_history() if args.history and operating_system.lower().startswith("lin") or operating_system.lower().startswith("dar") else ""}
File "/opt/homebrew/lib/python3.10/site-packages/copilot/history.py", line 46, in get_history
return _zsh_history(history_context_size)
File "/opt/homebrew/lib/python3.10/site-packages/copilot/history.py", line 29, in _zsh_history
lines = history_file.zsh_history_file_lines()
File "/opt/homebrew/lib/python3.10/site-packages/copilot/history_file.py", line 41, in zsh_history_file_lines
lines = history.read().splitlines()
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 552: invalid start byte
There are some unicode chars in my ~/.zsh_history
file:
The program does not run with a non-UTF8 locale crashing with the error message:
It does not seem to be related to the terminal emulator I'm using: reproduced with
konsole
andaterm
. Here is the complete output of my attempt to install and try outterminal-copilot
on Gentoo Linux:Previously, I had issues with various python software mysteriously crashing after seeing my non-UTF8 locale, but all the previous problems could be fixed by exporting
LANG=C
.