UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-97: character maps to <undefined>
See original GitHub issueHi,
New to Linode here. Just trying to run the command linode-cli linodes list
and get this huge error.
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\user\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\user\AppData\Local\Programs\Python\Python37\Scripts\linode-cli.exe\__main__.py", line 9, in <module>
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\linodecli\__init__.py", line 424, in main
cli.handle_command(parsed.command, parsed.action, args)
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\linodecli\cli.py", line 484, in handle_command
operation.process_response_json(result.json(), self.output_handler)
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\linodecli\operation.py", line 185, in process_response_json
handler.print(self.response_model, json)
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\linodecli\output.py", line 45, in print
self._table_output(header, data, columns, title, to)
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\linodecli\output.py", line 100, in _table_output
print(tab.table, file=to)
File "c:\users\user\appdata\local\programs\python\python37\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-97: character maps to <undefined>
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top 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 character ...
UnicodeEncodeError : 'charmap' codec can't encode character u'\u2026' in position 139: character maps to <undefined> #1.
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 >'charmap' codec can't encode characters in position 49-50
“return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 49-50: character maps ...
Read more >Character Issues - | notebook.community
... def decode(self,input,errors='strict'): UnicodeEncodeError: 'charmap' codec can't encode character '\xe3' in position 1: character maps to <undefined>.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That error suggests that some character coming back is not encoding correctly in the “Windows-1252” character encoding. I assume this is related to a unicode character in one of your Linode labels. Ideally, the CLI would force encoding to unicode for all output to prevent these errors. I don’t have ready access to a windows machine to reproduce this on, but I’ll try to get a fix posted before tomorrow’s scheduled CLI release.