Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--version crashes (Windows 10, installed with npm) #212

Closed
fuhrmanator opened this issue Jul 11, 2020 · 2 comments
Closed

--version crashes (Windows 10, installed with npm) #212

fuhrmanator opened this issue Jul 11, 2020 · 2 comments

Comments

@fuhrmanator
Copy link

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
Copy link
Member

adam-waldenberg commented Jul 11, 2020

@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.

@fuhrmanator
Copy link
Author

Thanks! Here is the solution for me:

export PYTHONIOENCODING=UTF-8

pyupio/safety#119 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants