colorama icon indicating copy to clipboard operation
colorama copied to clipboard

UnicodeDecodeError - 'ascii' codec can't decode characters in 0.4.4 README.rst

Open mlammers-maxar opened this issue 3 years ago • 4 comments

I was attempting to install a library that uses colorama in a Docker container and discovered that this was causing install failures from pip. I was using Python 3.6. I dug deeper and determined that there are two "·" (dot) characters in the 0.4.4 README.rst that is being read as part of the setup.py. These characters cannot be decoded using 7 bit ASCII. They appear to no longer be present in the master branch, but a new release (or an update to 0.4.4) is likely necessary without these characters.

mlammers-maxar avatar Nov 16 '20 16:11 mlammers-maxar

This reminds me of the PEP 597 proposal where problem with setup.py and utf8 is discussed:

For example, long_description = open("README.md").read() in setup.py is a common mistake. If there is at least one emoji or any other non-ASCII character in the README.md file, many Windows users cannot install the package due to a UnicodeDecodeError.

It seems to be the same issue here. It might be interesting to specify the encoding (instead of using the default one) when the README.rst is loaded: https://github.com/tartley/colorama/blob/9946cfb04917f5b12b9534111e803c2631a99ef3/setup.py#L17-L19

Delgan avatar Nov 16 '20 17:11 Delgan

README.rst should be ascii. This was fixed in 688f6cc by @tartley, but the latest release, 0.4.4, happened on a side branch that did not include this commit. This will be fixed by releasing a new version. @tartley are you up for it? We should have better tools to automate the release process - maybe this is a chance to test them.

wiggin15 avatar Nov 26 '20 11:11 wiggin15

Sounds good to me. I can try it out this weekend. If you want to get started before then, please go ahead.

On Thu, Nov 26, 2020, at 05:29, Arnon Yaari wrote:

README.rst should be ascii. This was fixed in 688f6cc by @tartley https://github.com/tartley, but the latest release, 0.4.4, happened on a side branch that did not include this commit. This will be fixed by releasing a new version. @tartley https://github.com/tartley are you up for it? We should have better tools to automate the release process - maybe this is a chance to test them.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tartley/colorama/issues/291#issuecomment-734244620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBV6Y5EX65Y44XCXBIBMDSRY327ANCNFSM4TXMTMWQ.

-- Jonathan Hartley USA, Central(UTC-5) @tartley http://tartley.com

tartley avatar Nov 27 '20 22:11 tartley

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251240

This is breaking FreeBSD's pkg builds for py36 as well :( Hope that the PR gets merged soon.

yzgyyang avatar Dec 19 '20 06:12 yzgyyang