Open benprofessionaledition opened 6 years ago
I had the same issue
with Path('glove.840B.300d.txt').open(encoding="utf-8") as f: works
If you use python3 you should not get any issue, but yes, technically specifying the encoding manually should fix it.
Hey Guillame, really excellent repo! I came across a minor issue with your code on macOS using Python 3.6.1 and the most recent version of GloVe 840B 300d (as of today).
In
build_glove.py
, the line:with Path('glove.840B.300d.txt').open() as f:
implicitly reads in the file as ASCII encoded which apparently doesn't play nice with however my stuff is set up. It can be remedied with the following code:Happy to submit a PR for this or else maybe you can just shove it in at your leisure. Thanks again for all your hard work