huwwp / cryptop

command line crypto portfolio
MIT License
235 stars 41 forks source link

UnicodeDecodeError on Mac OS with Python 3.6 #33

Closed tfohlmeister closed 7 years ago

tfohlmeister commented 7 years ago

I have Python 3.6 installed on Mac OS Sierra and running pip3 install cryptop gives me the following error:

Collecting cryptop
  Using cached cryptop-0.1.6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/m2/d8ct83y13dl89j8xth4jwn8r0000gn/T/pip-build-hbta5suz/cryptop/setup.py", line 7, in <module>
        readme = f.read()
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/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 1709: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m2/d8ct83y13dl89j8xth4jwn8r0000gn/T/pip-build-hbta5suz/cryptop/

Any idea on how to fix that? Thanks!

huwwp commented 7 years ago

I think MacOS defaults to ascii encoding.

As a workaround can you try export LANG=en_US.UTF-8 before pip3 install cryptop

I'll force the encoding in the next update. I haven't done testing on MacOS yet, let me know if there are any more issues.

huwwp commented 7 years ago

Alright latest build forces utf-8 encoding for reading of the readme, let me know if there are any issues, you should need to export the env var

tfohlmeister commented 7 years ago

Thanks, latest version fixes this!