--version crashes (Windows 10, installed with npm)
fuhrmanator opened this issue · comments
Christopher (Cris) Fuhrman commented
On Windows 10, in either WSL or git bash, with gitinspector
installed in npm
, the following command crashes:
gitinspector --version
Traceback (most recent call last):
File "C:\Users\BLAH\AppData\Roaming\npm/node_modules/gitinspector/gitinspector.py", line 24, in <module>
gitinspector.main()
File "C:\Users\BLAH\AppData\Roaming\npm\node_modules\gitinspector\gitinspector\gitinspector.py", line 178, in main
version.output()
File "C:\Users\BLAH\AppData\Roaming\npm\node_modules\gitinspector\gitinspector\version.py", line 34, in output
print("gitinspector {0}\n".format(__version__) + __doc__)
File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xa9' in position 32: character maps to <undefined>
Adam Waldenberg commented
@fuhrmanator Your shell is incorrectly set up, so python is unable to output the character \xa9
. You need to set your terminal to an encoding that can handle the character. Right now it's unable to show it - hence the error you get with the mapping to undefined
.
Christopher (Cris) Fuhrman commented