r4fek / django-cassandra-engine

Django Cassandra Engine - the Cassandra backend for Django
BSD 2-Clause "Simplified" License
365 stars 84 forks source link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 2293: #59

Closed arunpersaud closed 8 years ago

arunpersaud commented 8 years ago

Hi

when trying to build an rpm package on the open build server, I get the following error for python3

[   35s] + python3 setup.py build
[   35s] Traceback (most recent call last):
[   35s]   File "setup.py", line 11, in <module>
[   35s]     LONG_DESCRIPTION = f.read()
[   35s]   File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
[   35s]     return codecs.ascii_decode(input, self.errors)[0]
[   35s] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 2293: ordinal not in range(128)
[   35s] error: Bad exit status from /var/tmp/rpm-tmp.ZHhrmJ (%build)

Seems as if a f.read().decode('utf-8') should be used in setup.py for python3 or perhaps open( 'README.rst'), 'r', encoding='utf-8')?

r4fek commented 8 years ago

Thanks for the report @arunpersaud! Could you try it now?

arunpersaud commented 8 years ago

Just tried it out and I also had to change the 'r' to 'br' in the open statement, but then it worked.