facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions
Other
4.48k stars 896 forks source link

Update setup.py to fix setup bug #211

Closed GoMapur closed 5 years ago

GoMapur commented 5 years ago

Seen

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    readme = f.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8673: ordinal not in range(128)

Change reading readme in setup to explicitly use utf-8 will fix this

facebook-github-bot commented 5 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

ajfisch commented 5 years ago

This should already be the default for python 3. Your local environment variables are probably different?

export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8
GoMapur commented 5 years ago

Hmmm, I ran the setup from deepo (https://github.com/ufoym/deepo) and maybe it's a config issue with the docker image?

facebook-github-bot commented 5 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

ajfisch commented 5 years ago

Try setting the language like I suggested above. I think the docker config you are using leaves it empty: https://github.com/ufoym/deepo/issues/69

GoMapur commented 5 years ago

You are right! Thanks for pointing out the cause of the problem, I will close this PR as this is not needed.