Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Use binary mode to read README.rst (#282)
Browse files Browse the repository at this point in the history
Then decode utf-8 explicitly. For some reason, otherwise we get:

```
+ VERSION_NUMBER=4.1.1
+ /builds/turi/turicreate-build/scripts/../deps/env/bin/python setup.py
bdist_wheel
Traceback (most recent call last):
  File "setup.py", line 127, in <module>
    long_description = f.read()
  File
"/builds/turi/turicreate-build/scripts/../deps/env/lib/python3.5/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
106: ordinal not in range(128)
```
  • Loading branch information
znation authored and Zach Nation committed Feb 14, 2018
1 parent 5b21221 commit 8ad7785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unity/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def run(self):
sys.stderr.write(msg)
sys.exit(1)

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
long_description = f.read()
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'rb') as f:
long_description = f.read().decode('utf-8')

setup(
name="turicreate",
Expand Down

0 comments on commit 8ad7785

Please sign in to comment.