hayd / pep8radius

PEP8 clean only the parts of the files touched since the last commit, a previous commit or (the merge-base of) a branch.
MIT License
183 stars 9 forks source link

cannot decode byte #86

Open ghost opened 7 years ago

ghost commented 7 years ago

This happened when I tried to use pep8radius:

Traceback (most recent call last):
  File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python36\Scripts\pep8radius.exe\__main__.py", line 9, in <module>
  File "c:\program files\python36\lib\site-packages\pep8radius\main.py", line 275, in _main
    return sys.exit(main(args=args, vc=vc, cwd=cwd, apply_config=True))
  File "c:\program files\python36\lib\site-packages\pep8radius\main.py", line 65, in main
    args = parse_args(args, apply_config=apply_config)
  File "c:\program files\python36\lib\site-packages\pep8radius\main.py", line 211, in parse_args
    parser = apply_config_defaults(parser, args, root=root)
  File "c:\program files\python36\lib\site-packages\pep8radius\main.py", line 243, in apply_config_defaults
    root = VersionControl.which().root_dir()
  File "c:\program files\python36\lib\site-packages\pep8radius\vcs.py", line 84, in which
    if k.startswith('using_') and using_vc(cwd=cwd):
  File "c:\program files\python36\lib\site-packages\pep8radius\vcs.py", line 24, in using_git
    git_log = shell_out(["git", "log"], cwd=cwd)
  File "c:\program files\python36\lib\site-packages\pep8radius\shell.py", line 58, in shell_out
    out = check_output(cmd, cwd=cwd, stderr=stderr, universal_newlines=True)
  File "c:\program files\python36\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "c:\program files\python36\lib\subprocess.py", line 405, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "c:\program files\python36\lib\subprocess.py", line 825, in communicate
    stdout = self.stdout.read()
  File "c:\program files\python36\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 937662: character maps to <undefined>