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

add unicode error catching #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add unicode error catching #29

wants to merge 1 commit into from

Conversation

ITJamie
Copy link

@ITJamie ITJamie commented May 20, 2022

So i found this when i hit some non unicode files.

examples of some errors caught with this

this is a rough fix but at least allows tests to complete. without this catch the script would crash

unable to process file (path removed) due to unicode decode error
'utf-8' codec can't decode byte 0xa7 in position 195: invalid start byte
unable to process file (path removed) due to unicode decode error
'utf-8' codec can't decode byte 0xa1 in position 33: invalid start byte

The script probably shouldnt just assume a file is going to be utf8 encoded

So i found this when i hit some non unicode files. 

examples of some errors caught with this

this is a rough fix but at least allows tests to complete. without this catch the script would crash
```
unable to process file (path removed) due to unicode decode error
'utf-8' codec can't decode byte 0xa7 in position 195: invalid start byte
unable to process file (path removed) due to unicode decode error
'utf-8' codec can't decode byte 0xa1 in position 33: invalid start byte
```
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

Successfully merging this pull request may close these issues.

1 participant