question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 559: character maps to <undefined>

See original GitHub issue

Describe the bug

See title

How to reproduce

CLC@DESKTOP-4CR54IP MINGW64 /c/Users/CLX
$ pipx install eth-brownie

Traceback (most recent call last):
  File "C:\Users\CLX\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\CLX\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\Scripts\pipx.exe\__main__.py", line 7, in <module>
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\site-packages\pipx\main.py", line 779, in cli
    return run_pipx_command(parsed_pipx_args)
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\site-packages\pipx\main.py", line 202, in run_pipx_command
    return commands.install(
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\site-packages\pipx\commands\install.py", line 60, in install
    venv.install_package(
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\site-packages\pipx\venv.py", line 238, in install_package
    subprocess_post_check_handle_pip_error(pip_process)
  File "C:\Users\CLX\AppData\Roaming\Python\Python310\site-packages\pipx\util.py", line 349, in subprocess_post_check_handle_pip_error
    print(completed_process.stderr, file=pip_error_fh, end="")
  File "C:\Users\CLX\AppData\Local\Programs\Python\Python310\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 '\u2502' in position 559: character maps to <undefined>

I tried the env vars from here and didn’t help

https://stackoverflow.com/questions/27092833/unicodeencodeerror-charmap-codec-cant-encode-characters

This is on Win 10.

$ python --version
Python 3.10.4

$ pipx --version
1.0.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cs01commented, May 12, 2022

It’s unfortunate that a release hasn’t been made yet, because this is fixed in main. @uranusjr or @gaborbernat are you able to make a release? If not, I can probably get to it next week.

0reactions
turazashvilicommented, Jun 10, 2022

This has been fixed in v1.1.0

Thanks for update.

it’s well known thing, but I feel like it’s more challenging to set up an environment than creating a project 😃)))

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnicodeEncodeError: 'charmap' codec can't encode characters
The reason why it is working is because the encoding is changed to UTF-8 when using the file, so characters in UTF-8 are...
Read more >
UnicodeEncodeError: 'charmap' codec can't encode ... - GitHub
UnicodeEncodeError : 'charmap' codec can't encode character u'\u2026' in position 139: character maps to <undefined> #1. Open. baditaflorin opened this issue on ...
Read more >
'charmap' codec can't encode characters in position | bobbyhadz
The Python "UnicodeEncodeError: 'charmap' codec can't encode characters in position" occurs when we use an incorrect codec to encode a string to ...
Read more >
'charmap' codec can't encode character... - YouTube
SOLVED #PYTHON #ERROR UnicodeEncodeError : ' charmap ' codec can't encode character '\u266b' in position 157411: character maps to undefined ...
Read more >
'charmap' codec can't encode characters in position 0-14 ...
Hi! How to solve "UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-14: character maps to " for this code: stockList ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found