DavidoTek/ProtonUp-Qt

UnicodeDecodeError: "'utf-8' codec can't decode byte"

NerosTie opened this issue · 1 comments

Describe the bug
When I try to launch protonup-qt, I have this error (with the one in AUR and with the appimage):

ProtonUp-Qt 2.10.0 by DavidoTek. Build Info: built from source.
Python 3.12.6 (main, Sep  8 2024, 13:18:56) [GCC 14.2.1 20240805], PySide 6.7.2
Platform: Arch rolling Linux-6.10.10-arch1-1-x86_64-with-glibc2.40
Loading locale fr / fr_FR
Loaded ctmod GE-Proton
Loaded ctmod Wine-GE
Loaded ctmod Boxtron
Loaded ctmod Kron4ek Wine-Builds Vanilla
Loaded ctmod Lutris-Wine
Loaded ctmod Luxtorpeda
Loaded ctmod Northstar Proton (Titanfall 2)
Loaded ctmod Proton Tkg
Loaded ctmod Proton Tkg (Wine Master)
Loaded ctmod Roberta
Loaded ctmod Steam-Play-None
Loaded ctmod SteamTinkerLaunch
Loaded ctmod SteamTinkerLaunch-git
Loaded ctmod vkd3d-lutris
Loaded ctmod vkd3d-proton
Loaded ctmod Wine Tkg (Valve Wine Bleeding Edge)
Loaded ctmod Wine Tkg (Wine Master)
Loaded ctmod DXVK
Loaded ctmod DXVK Async
Loaded ctmod DXVK (nightly)
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
Error: Could not get a list of all Steam apps: 'utf-8' codec can't decode byte 0xcb in position 6418: invalid continuation byte
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.12/site-packages/pupgui2/__main__.py", line 2, in <module>
    main()
  File "/usr/lib/python3.12/site-packages/pupgui2/pupgui2.py", line 588, in main
    MainWindow()
  File "/usr/lib/python3.12/site-packages/pupgui2/pupgui2.py", line 115, in __init__
    self.update_ui()
  File "/usr/lib/python3.12/site-packages/pupgui2/pupgui2.py", line 249, in update_ui
    global_ctool_name: str = get_steam_global_ctool_name(install_loc.get('vdf_dir'))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pupgui2/steamutil.py", line 221, in get_steam_global_ctool_name
    d = get_steam_vdf_compat_tool_mapping(vdf.load(open(config_vdf_file)))
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/vdf/__init__.py", line 211, in load
    return parse(fp, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/vdf/__init__.py", line 97, in parse
    for lineno, line in enumerate(fp, 1):
                        ^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 6418: invalid continuation byte

Gamepad error: No gamepad found.

To Reproduce
Steps to reproduce the behavior:

  1. install protonup-qt from AUR or download the AppImage
  2. launch it

Expected behavior
To work

Screenshots
Copie d'écran_20240917_053255

Desktop (please complete the following information):

  • Platform: PC
  • System: Arch
  • Version: ProtonUp-Qt 2.10.2
  • How did you install ProtonUp-Qt?: AUR / AppImage

Duplicate of #424

Likely caused by a misconfigured system locale, see the comments in issue#424.

Will be completely fixed in the next version of ProtonUp-Qt, once PR#455 is merged. It will detect defective characters in the file and replace them with something that won't cause a crash.

EDIT: There is a slight deviation in the error as in your case there is an invalid continuation byte while in issue#424 there is an invalid start byte. Still, it is likely the same root cause.