roryk / ipython-cluster-helper

Tool to easily start up an IPython cluster on different schedulers.
148 stars 23 forks source link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2444 of README.rst #43

Closed Amar-Chaudhari closed 7 years ago

Amar-Chaudhari commented 7 years ago

I am trying to build rpm including the ipython-cluster-helper package. However, the build process is throwing an Decode error.

Trace-

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/rpmvenvepqy9cee/BUILDROOT/some-rpm-package-name-1.2.3-1.x86_64/opt/test/jupyterhub/src/ipython-cluster-helper/setup.py", line 16, in <module>
        long_description=(open('README.rst').read()),
      File "/tmp/rpmvenvepqy9cee/BUILDROOT/some-rpm-package-name-1.2.3-1.x86_64//opt/test/jupyterhub/lib64/python3.4/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2444: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/rpmvenvepqy9cee/BUILDROOT/some-rpm-package-name-1.2.3-1.x86_64/opt/test/jupyterhub/src/ipython-cluster-helper/
roryk commented 7 years ago

Hi Amar,

Sorry for the problem. It seems to work okay on my local system using python 3.5. If you set the line:

long_description=(open('README.rst').read())

to be

long_description=(open('README.rst', encoding='utf-8').read()),

in setup.py does it fix the problem?

Amar-Chaudhari commented 7 years ago

@roryk

Yup, setting encoding='utf-8' certainly fixed the issue for me ! :)

Thanks for the help !

roryk commented 7 years ago

Thanks Amar, I pushed a fix for this so it should do the right thing on Python 2/3.