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

address UTF-8 error on windows #654

Merged
merged 4 commits into from
Mar 2, 2021
Merged

address UTF-8 error on windows #654

merged 4 commits into from
Mar 2, 2021

Conversation

dbarrosop
Copy link
Contributor

@dbarrosop dbarrosop commented Mar 1, 2021

Windows throws the following error when trying to open a UTF-8 encoded file without specifying the encoding:

UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 11744: illegal multibyte sequence

This PR allows users to specify the encoding of SimpleInventory

@dbarrosop dbarrosop changed the title address UTF-8 error on windows WIP address UTF-8 error on windows Mar 1, 2021
@dbarrosop
Copy link
Contributor Author

dbarrosop commented Mar 1, 2021

Looks like GH actions is having troubles and the CI isn't running so I am not sure if I managed to trigger the error there for future testing. In any case, the fix should work. I will check later if the issue is triggered in the CI without the fix.

@nmweizi would you mind testing this? thanks for reporting!

@dbarrosop dbarrosop changed the title WIP address UTF-8 error on windows address UTF-8 error on windows Mar 1, 2021
@dbarrosop
Copy link
Contributor Author

interestingly the error didn't trigger as described but it certainly was caught:

https://github.com/nornir-automation/nornir/runs/2006936942?check_suite_focus=true

Note the error only shows up with windows

@ktbyers
Copy link
Collaborator

ktbyers commented Mar 1, 2021

This looks good to me.

Kirk

@nmweizi
Copy link

nmweizi commented Mar 2, 2021

@dbarrosop This looks good to me too.

@dbarrosop
Copy link
Contributor Author

Thanks!

@dbarrosop dbarrosop merged commit e4f6b8c into develop Mar 2, 2021
@dbarrosop dbarrosop deleted the utf-8 branch March 2, 2021 08:03
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.

3 participants