unimport
unimport copied to clipboard
Emoji in print causes an exception on non utf terminals
This line https://github.com/unimport/unimport/blob/27f421d5f83dee28d7c996db76573ffef8e782cf/unimport/main.py#L196 lead to this error:
Traceback (most recent call last):
File "C:\redacted\Scripts\unimport-script.py", line 33, in <module>
sys.exit(load_entry_point('unimport==0.7.4', 'console_scripts', 'unimport')())
File "c:\redacted\lib\site-packages\unimport\main.py", line 194, in main
print(
File "C:\redacted\Python38\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2728' in position 0: character maps to <undefined>
I intend to remove these emojis, and maybe even colours. Since they are too problematic for CLI applications. What do you think @hakancelik96?
I intend to remove these emojis, and maybe even colors. Since they are too problematic for CLI applications. What do you think @hakancelik96?
I think we may remove it, they seem to be causing more problems than problem-solving.
Hi @tolomea, I worked a little on this issue but I was not sure the issue was solved, can you install it on your system with the master branch and try again, if you get the same error please let me know what caused it.