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

Fix TypeError when printing color codes to stdout #145

Merged
merged 1 commit into from
Oct 13, 2019

Conversation

Pawka
Copy link
Contributor

@Pawka Pawka commented Oct 9, 2019

TypeError exception is thrown when str() function treats terminal color code (e.g. \033[33m) as UTF-8:

In [2]: str("\033[33m", "utf-8", "replace")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-54259ae346a9> in <module>()
----> 1 str("\033[33m", "utf-8", "replace")

TypeError: decoding str is not supported

Resolves #125 #139 #115 #101

Copy link
Owner

@lorenzodifuccia lorenzodifuccia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved #145

@lorenzodifuccia lorenzodifuccia merged commit 86355e6 into lorenzodifuccia:master Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: decoding str is not supported
2 participants