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

Scan throws a UnicodeEncodeError when ini file has unicode on RHS #142

Closed
KevinHock opened this issue Mar 19, 2019 · 1 comment
Closed
Labels
good first issue The issue can be tackled by someone who has little to no knowledge about the project.

Comments

@KevinHock
Copy link
Collaborator

Scanning a Unicode file (e.g. detect-secrets scan poc.foo) results in

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 76: ordinal not in range(128)

The last place in the stack trace is

re.escape(values_list[current_value_list_index]),

https://github.com/Yelp/detect-secrets/pull/129/files was a previous fix for something similar, where from __future__ import unicode_literals fixed the issue easily. I vimd into my site-packages, added the line to ini_file_parser.py, and it fixed it. So we just need to make a PR similar to #129.

@KevinHock KevinHock added bug good first issue The issue can be tackled by someone who has little to no knowledge about the project. labels Mar 19, 2019
@KevinHock
Copy link
Collaborator Author

KevinHock commented Mar 20, 2019

This was fixed in #143, gonna leave issue open until we bump to a new version.

@KevinHock KevinHock changed the title Scan throws a UnicodeEncodeError Scan throws a UnicodeEncodeError when ini file has unicode on RHS Mar 21, 2019
KevinHock added a commit that referenced this issue Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue The issue can be tackled by someone who has little to no knowledge about the project.
Projects
None yet
Development

No branches or pull requests

1 participant