Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mlammers-maxar opened this issue Nov 16, 2020 · 4 comments
Labels
0.4.5 Get merged for 0.4.5 release

Comments

@mlammers-maxar
Copy link

mlammers-maxar commented Nov 16, 2020

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.

@Delgan
Copy link
Contributor

Delgan commented Nov 16, 2020

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:

colorama/setup.py

Lines 17 to 19 in 9946cfb

def read_file(path):
with open(os.path.join(os.path.dirname(__file__), path)) as fp:
return fp.read()

@wiggin15
Copy link
Collaborator

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.

@tartley
Copy link
Owner

tartley commented Nov 27, 2020 via email

@yzgyyang
Copy link

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.

@tartley tartley added the 0.4.5 Get merged for 0.4.5 release label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.4.5 Get merged for 0.4.5 release
Projects
None yet
Development

No branches or pull requests

5 participants