arrow icon indicating copy to clipboard operation
arrow copied to clipboard

readme.rst encoding problem

Open arunpersaud opened this issue 11 years ago • 9 comments

When trying to build the latest version for opensuse (python3), I get the following error

[   62s] + python3 setup.py build
[   62s] Traceback (most recent call last):
[   62s]   File "setup.py", line 31, in <module>
[   62s]     long_description=open('README.rst').read(),
[   62s]   File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
[   62s]     return codecs.ascii_decode(input, self.errors)[0]
[   62s] UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 2974: ordinal not in range(128)
[   63s] error: Bad exit status from /var/tmp/rpm-tmp.C9qOZS (%build)

Other projects[1] use for example:

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

which seems to solve this problem, but I don't know if this is the correct way of solving this issue or if there is a better one. Also not sure if this could cause problems with other python versions.

Anyway, thought I drop a quick note about this.

[1] http://code.tabo.pe/django-treebeard/issue/74/trouble-installing-with-python3-and-docker

arunpersaud avatar Feb 27 '15 21:02 arunpersaud

Thanks for bringing it up. In the latest we're using

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

https://github.com/crsmithdev/arrow/blob/master/setup.py#L32

Do you still get the error?

andrewelkins avatar Feb 27 '15 21:02 andrewelkins

Should have checked master before opening this issue (only tried the tar-ball for 0.5.4), sorry about that

Seems that you use codecs in bef52b124684c6f16b4d535cd597ccc44d9fd2e8.

Just tried to build it using the latest setup.py and it worked. Thanks and sorry for the noise

arunpersaud avatar Feb 27 '15 22:02 arunpersaud

No problem!

andrewelkins avatar Feb 27 '15 22:02 andrewelkins

Do you know when this fix will be released and pushed to pypi ? I am having the same issue.

Thanks

bchatelard avatar May 26 '15 10:05 bchatelard

:+1: for a quick release ! :)

kdeldycke avatar May 26 '15 11:05 kdeldycke

+1 for releasing a new version containing this fix to PyPi

jcbsv avatar May 29 '15 13:05 jcbsv

+1 for a pypi release

vmalloc avatar Jun 01 '15 10:06 vmalloc

+1 for a pypi release

eroh92 avatar Jun 10 '15 00:06 eroh92

+1 for pypi

deanchen avatar Jun 10 '15 00:06 deanchen