HGL
xenial-black

UnicodeEncodeError: 'charmap' codec can't encode character...

After updating Heroic from 2.6.2 to 2.7.0 I get this error on launch(see screenshot). After I close it everything seems to work but this error appears from time to time. Logout/relogin does not help. The relevant part of that log, the very end:
Orphaned DLCs:
- DLCs for 16268e7a56184fada899a673ab14260a:
+ Bakerloo Line (App name: 5d31a6c96b204613b17d690ca88cf9f9 | Version: 1.0.5)
+ Sand Patch Grade (App name: 098b530746fa4cfb8b11484bfdc18a2d | Version: 1.0.2)[cli] INFO: Logging in...[Core] INFO: Trying to re-use existing login session...[cli] INFO: Getting game list... (this may take a while)Traceback (most recent call last):
File "legendary\cli.py", line 3069, in <module>
File "legendary\cli.py", line 2980, in main
File "legendary\cli.py", line 272, in list_games
File "encodings\cp1251.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\xf6' in position 24: character maps to <undefined>
[16100] Failed to execute script 'cli' due to unhandled exception!
Orphaned DLCs:
- DLCs for 16268e7a56184fada899a673ab14260a:
+ Bakerloo Line (App name: 5d31a6c96b204613b17d690ca88cf9f9 | Version: 1.0.5)
+ Sand Patch Grade (App name: 098b530746fa4cfb8b11484bfdc18a2d | Version: 1.0.2)[cli] INFO: Logging in...[Core] INFO: Trying to re-use existing login session...[cli] INFO: Getting game list... (this may take a while)Traceback (most recent call last):
File "legendary\cli.py", line 3069, in <module>
File "legendary\cli.py", line 2980, in main
File "legendary\cli.py", line 272, in list_games
File "encodings\cp1251.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\xf6' in position 24: character maps to <undefined>
[16100] Failed to execute script 'cli' due to unhandled exception!
If I run "legendary list" manually the list ends with
Orphaned DLCs:
- DLCs for 16268e7a56184fada899a673ab14260a:
+ Bakerloo Line (App name: 5d31a6c96b204613b17d690ca88cf9f9 | Version: 1.0.5)
+ Sand Patch Grade (App name: 098b530746fa4cfb8b11484bfdc18a2d | Version: 1.0.2)
+ Schnellfahrstrecke Köln-Aachen (App name: 4fec3df59df9406c9a243d40fbd7bdfb | Version: 1.0.2)
Total: 306
Orphaned DLCs:
- DLCs for 16268e7a56184fada899a673ab14260a:
+ Bakerloo Line (App name: 5d31a6c96b204613b17d690ca88cf9f9 | Version: 1.0.5)
+ Sand Patch Grade (App name: 098b530746fa4cfb8b11484bfdc18a2d | Version: 1.0.2)
+ Schnellfahrstrecke Köln-Aachen (App name: 4fec3df59df9406c9a243d40fbd7bdfb | Version: 1.0.2)
Total: 306
If I try to output it to file like this "legendary list >1.txt" it outputs the same error as above. My OS language is Russian, cp1251 is the default codepage for it. I downgraded Heroic to 2.6.2 and the problem was gone. Even though manually running legendary with output to file still produced that error, Heroic itself runs fine. It appears that "Schnellfahrstrecke Köln-Aachen" with its letter "ö" is the problem here. \xf6 is that that letter's code in cp1252 codepage. I think Heroic changed some handling of codepages in the latest version which causes this error for me.
No description
1 Reply
correct-apricot
correct-apricot3y ago
We aware of this issue. The error also occurs on older heroic versions but in 2.7.0 we just report the error to the frontend

Did you find this page helpful?