aalto-speech / morfessor

Morfessor is a tool for unsupervised and semi-supervised morphological segmentation
http://morpho.aalto.fi
BSD 2-Clause "Simplified" License
180 stars 27 forks source link

UnicodeDecodeError when install via pip #9

Closed dvinegla closed 7 years ago

dvinegla commented 7 years ago
Downloading Morfessor-2.0.2.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-build-wy451zlq/morfessor/setup.py", line 9, in <module>
        main_py = open('morfessor/__init__.py').read()
      File "/usr/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 0xc3 in position 373: ordinal not in range(128)

https://github.com/aalto-speech/morfessor/commit/cf061cf1649873e29eb9e92ccf51449def0f7e1d#diff-4ffe01edeab0886c81c728bf704ac894R13

maybe you need to add # -*- coding: utf-8 -*- https://www.python.org/dev/peps/pep-0263/

psmit commented 7 years ago

Thanks for the report! The actual problem was in setup.py which was not written with python3 in mind. I fixed it now and released version 2.0.3. Let me know if you find any more issues.