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

Fix the UnicodeDecodeError in np.loadtxt #11

Merged

Conversation

dmitrijsk
Copy link
Contributor

(This is a corrected version of PR #8)

On Windows 10 np.loadtxt raises UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1983: character maps to <undefined>.
On CentOS 7: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 858: ordinal not in range(128)

Specifying the UTF-8 encoding fixes the problem. Tested on Windows 10 and CentOS 7.

In contributing guidelines you ask for tests. But I'm not sure what kind of tests should I add since there are no other tests in the repo. Happy to do that if you clarify this point. I completed the CLA.

…n position 1983: character maps to <undefined>` error in `np.loadtxt`.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 16, 2021
@kris314 kris314 merged commit 756a9ac into facebookresearch:main Dec 20, 2021
@kris314
Copy link
Contributor

kris314 commented Dec 20, 2021

Thank you @dmitrijsk !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants