Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

add explicit encoding for opening w2v to allow code to work on windows - #134

Merged
aconneau merged 1 commit into
facebookresearch:masterfrom
nickyeolk:glove_error
Aug 29, 2019
Merged

add explicit encoding for opening w2v to allow code to work on windows#134
aconneau merged 1 commit into
facebookresearch:masterfrom
nickyeolk:glove_error

Conversation

@nickyeolk

Copy link
Copy Markdown

w2v vectors are encoded in utf-8. When running python 3 on windows (North America), the default encoding used for opening files are 8bit Windows-1252 character set. Reading the w2v file thus throws a decoding error. Setting an encoding will ensure that the w2v vector file can be read. This is also referenced in issue #98.

@aconneau
aconneau merged commit 31eede6 into facebookresearch:master Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants