Closed
Description
python 2.7.10
windows powershell
when I type:
> git comit -am 'test'
> fuck
it gives me something that is completely weird:
C:\Python27\lib\site-packages\win_unicode_console\__init__.py:27: RuntimeWarning: sys.stdin.encoding == 'utf-8', whereas sys.stdout.encoding == None, readline hook consumer may assume they are the same
readline_hook.enable(use_pyreadline=use_pyreadline)
�[1mgit commit -am 'test'�[0m [�[32menter�[0m/�[34m↑�[0m/�[34m↓�[0m/�[31mctrl+c�[0m]
and then give an exception:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\thefuck.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\thefuck\main.py", line 80, in main
fix_command()
File "C:\Python27\lib\site-packages\thefuck\main.py", line 32, in fix_command
selected_command = select_command(corrected_commands)
File "C:\Python27\lib\site-packages\thefuck\ui.py", line 80, in select_command
for action in read_actions():
File "C:\Python27\lib\site-packages\thefuck\ui.py", line 13, in read_actions
key = get_key()
File "C:\Python27\lib\site-packages\thefuck\system\win32.py", line 25, in get_key
return ch.decode(sys.stdout.encoding)
TypeError: decode() argument 1 must be string, not None
I think this is related to UTF-8 encoding in python2...
I cannot add python3 to path, because my vim plugins will require python2 in the path...
Is there any way I can fix this?