You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
A minor bug, but was confusing when I stumbled across it. puts(colored.red(1)) works as expected normally, but doesn't degrade correctly when colors aren't supported.
test1.py:
from clint.textui import puts, colored
puts(colored.red(1))
test2.py:
from clint.textui import puts, colored
puts(colored.red('1'))
$ python test1.py
1 (colored)
$ python test1.py | cat
TypeError: coercing to Unicode: need string or buffer, int found
$ python test2.py
1 (colored)
$ python test2.py | cat
1
The text was updated successfully, but these errors were encountered:
What version did you use? If I run your first test I get an AttributeError for the int value. It seems that in the current version only strings are supported.
A minor bug, but was confusing when I stumbled across it.
puts(colored.red(1))
works as expected normally, but doesn't degrade correctly when colors aren't supported.test1.py:
test2.py:
The text was updated successfully, but these errors were encountered: