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

Emoji in print causes an exception on non utf terminals #177

Closed
tolomea opened this issue Mar 1, 2021 · 3 comments · Fixed by #185
Closed

Emoji in print causes an exception on non utf terminals #177

tolomea opened this issue Mar 1, 2021 · 3 comments · Fixed by #185
Labels
bug Something isn't working

Comments

@tolomea
Copy link

tolomea commented Mar 1, 2021

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>
@isidentical
Copy link
Collaborator

I intend to remove these emojis, and maybe even colours. Since they are too problematic for CLI applications. What do you think @hakancelik96?

@isidentical isidentical added the bug Something isn't working label Mar 2, 2021
@hakancelikdev
Copy link
Owner

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.

@hakancelikdev hakancelikdev linked a pull request May 8, 2021 that will close this issue
hakancelikdev added a commit that referenced this issue May 8, 2021
* Fix emoji

* Update readme
@hakancelikdev hakancelikdev reopened this May 8, 2021
@hakancelikdev
Copy link
Owner

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.

hakancelikdev added a commit that referenced this issue Jul 16, 2022
* Fix emoji

* Update readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants