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

Unicode Decode Error #12

Open
overfl0wd opened this issue Jul 8, 2019 · 1 comment
Open

Unicode Decode Error #12

overfl0wd opened this issue Jul 8, 2019 · 1 comment

Comments

@overfl0wd
Copy link

Hi again, I've found a few of my repositories to return the following error.

Traceback (most recent call last):
File "/home/dvnv/.local/lib/python3.6/site-packages/gittyleaks/gittyleaks.py", line 86, in get_git_matches
revision, _tty_out=False))
File "/home/dvnv/.local/lib/python3.6/site-packages/sh.py", line 884, in str
return self.unicode()
File "/home/dvnv/.local/lib/python3.6/site-packages/sh.py", line 893, in unicode
self.call_args["decode_errors"])
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc5 in position 6652274: invalid continuation byte

@dreaddesign
Copy link

old issue but still relevant for me.

I was able to find this error somewhat useful for debugging:
"UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 67580: invalid start byte"

i believe one of our developers using Windows committed to our repo with some software that interacts with github and used a windows specific character in the commit message ("smart quote" character)

unfortunately, if seems like the error happens at

return str(git('grep', '-i', '-e', '"({})"'.format(r'\|'.join(self.keywords)), revision, _tty_out=False))

and it is outside of my skillset to figure out how to essentially take the result of the git grep and replace/ignore the improper characters.

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