diana-hep / oamap

Perform high-speed calculations on columnar data without creating intermediate objects.
BSD 3-Clause "New" or "Revised" License
81 stars 11 forks source link

Installation broken, can't decode README.rst in python 3.6.5 #7

Closed kreczko closed 6 years ago

kreczko commented 6 years ago

When trying to install oamap either from pypi or git, I get the following error:

  Using cached https://files.pythonhosted.org/packages/8a/ff/8fbed6d0574d8ed8ea5132cc3b613055ec357a459198d21c0528b02038bc/oamap-0.12.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yj2byhwj/oamap/setup.py", line 48, in <module>
        long_description = open("README.rst").read().strip(),
      File "/code/FAST-TOP/external/miniconda/envs/fast/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 1647: ordinal not in range(128)

This can be replicated by running

python -c "f = open('README.rst'); content = f.read()"

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/code/FAST-TOP/external/miniconda/envs/fast/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 1647: ordinal not in range(128)

using Python 3.6.5

The culprits are the two special dashes: Python objects— lists, tuples, class instances—. I assume that the editor replaced double dash (--) with a special ASCII character.